]> git.baikalelectronics.ru Git - kernel.git/commit
[SNMP]: Fix SNMP counters with PREEMPT
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 20 Dec 2007 12:13:21 +0000 (04:13 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:59:16 +0000 (14:59 -0800)
commit72638af3cf5ee3d609aeba749acf13f7bbe0218f
tree6c8c7ec7feefbc9c966863bc73d576017f833563
parentfb0faf99894f83c278bfe501501b52eebb20aa5a
[SNMP]: Fix SNMP counters with PREEMPT

The SNMP macros use raw_smp_processor_id() in process context
which is illegal because the process may be preempted and then
migrated to another CPU.

This patch makes it use get_cpu/put_cpu to disable preemption.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/snmp.h