]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Aug 2010 23:46:00 +0000 (16:46 -0700)
commit1378008ccdfdfcedbd6503f00e52124bfce1e0f7
tree8d70eb9670410eafe8ffabf9c906468a6d1b429f
parent34793c34a78af4043f119c7fc332526d5b012fd0
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>
net/core/dev.c