]> git.baikalelectronics.ru Git - kernel.git/commit
net: disable preemption before call smp_processor_id()
authorChangli Gao <xiaosuo@gmail.com>
Sun, 8 Aug 2010 03:35:43 +0000 (20:35 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 Aug 2010 03:35:43 +0000 (20:35 -0700)
commite3b793b83bd61c752ce9dd87f7776ddf6334d335
treea3bd2c2a1953624b710524f56d98d7b1496f60a6
parent98bb57cd7699ad44d34b3ae748d872b1645eb3d9
net: disable preemption before call smp_processor_id()

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>
net/core/dev.c