[NETFILTER]: nf_conntrack: fix smp_processor_id() in preemptible code warning
authorPatrick McHardy <kaber@trash.net>
Wed, 27 Feb 2008 20:07:47 +0000 (12:07 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Feb 2008 20:07:47 +0000 (12:07 -0800)
commit4e29e9ec7e0707d3925f5dcc29af0d3f04e49833
treedd857d9bd6a4321048e63a520436584a00d41234
parent3bdfe7ec08b4256121a8894cd978e74fcf7031d7
[NETFILTER]: nf_conntrack: fix smp_processor_id() in preemptible code warning

Since we're using RCU for the conntrack hash now, we need to avoid
getting preempted or interrupted by BHs while changing the stats.

Fixes warning reported by Tilman Schmidt <tilman@imap.cc> when using
preemptible RCU:

[   48.180297] BUG: using smp_processor_id() in preemptible [00000000] code: ntpdate/3562
[   48.180297] caller is __nf_conntrack_find+0x9b/0xeb [nf_conntrack]
[   48.180297] Pid: 3562, comm: ntpdate Not tainted 2.6.25-rc2-mm1-testing #1
[   48.180297]  [<c02015b9>] debug_smp_processor_id+0x99/0xb0
[   48.180297]  [<fac643a7>] __nf_conntrack_find+0x9b/0xeb [nf_conntrack]

Tested-by: Tilman Schmidt <tilman@imap.cc>
Tested-by: Christian Casteyde <casteyde.christian@free.fr> [Bugzilla #10097]
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nf_conntrack_core.c