netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 11/11] netfilter warning fix
@ 2007-02-06  0:31 akpm
  2007-02-06  2:10 ` David Miller
  0 siblings, 1 reply; 16+ messages in thread
From: akpm @ 2007-02-06  0:31 UTC (permalink / raw)
  To: davem; +Cc: netdev, akpm, akpm, kaber

From: Andrew Morton <akpm@osdl.org>

"using smp_processor_id() in preemptible code"

Cc: Patrick McHardy <kaber@trash.net>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/net/netfilter/nf_conntrack.h |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff -puN include/net/netfilter/nf_conntrack.h~netfilter-warning-fix include/net/netfilter/nf_conntrack.h
--- a/include/net/netfilter/nf_conntrack.h~netfilter-warning-fix
+++ a/include/net/netfilter/nf_conntrack.h
@@ -254,7 +254,12 @@ extern atomic_t nf_conntrack_count;
 extern int nf_conntrack_max;
 
 DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat);
-#define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++)
+#define NF_CT_STAT_INC(count)						\
+	do {								\
+		preempt_disable();					\
+		__get_cpu_var(nf_conntrack_stat).count++;		\
+		preempt_enable();					\
+	} while (0);
 
 /* no helper, no nat */
 #define	NF_CT_F_BASIC	0
_

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2007-02-07  8:19 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-06  0:31 [patch 11/11] netfilter warning fix akpm
2007-02-06  2:10 ` David Miller
2007-02-06  2:18   ` Andrew Morton
2007-02-06  2:44     ` David Miller
2007-02-06  2:53       ` Andrew Morton
2007-02-06 12:34         ` Ingo Molnar
2007-02-06 19:43           ` David Miller
2007-02-06 21:02             ` Ingo Molnar
2007-02-06 21:23               ` David Miller
2007-02-06 21:58                 ` Ingo Molnar
2007-02-07  6:43                   ` Patrick McHardy
2007-02-07  8:07                     ` Ingo Molnar
2007-02-07  8:13                       ` David Miller
2007-02-07  8:16                         ` Patrick McHardy
2007-02-07  8:18                           ` Ingo Molnar
2007-02-06  9:21       ` Martin Josefsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).