Commit 1378008
net: disable preemption before call smp_processor_id()
[ Upstream commit cece1945bffcf1a823cdfa36669beae118419351 ]
Although netif_rx() isn't expected to be called in process context with
preemption enabled, it'd better handle this case. And this is why get_cpu()
is used in the non-RPS #ifdef branch. If tree RCU is selected,
rcu_read_lock() won't disable preemption, so preempt_disable() should be
called explictly.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>1 parent 34793c3 commit 1378008
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2504 | 2504 | | |
2505 | 2505 | | |
2506 | 2506 | | |
| 2507 | + | |
2507 | 2508 | | |
2508 | 2509 | | |
2509 | 2510 | | |
| |||
2513 | 2514 | | |
2514 | 2515 | | |
2515 | 2516 | | |
| 2517 | + | |
2516 | 2518 | | |
2517 | 2519 | | |
2518 | 2520 | | |
| |||
0 commit comments