[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200702060032.l160WErX004652@shell0.pdx.osdl.net>
Date: Mon, 05 Feb 2007 16:31:11 -0800
From: akpm@...ux-foundation.org
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, akpm@...ux-foundation.org,
akpm@...ux-foundation.org, kaber@...sh.net
Subject: [patch 11/11] netfilter warning fix
From: Andrew Morton <akpm@...l.org>
"using smp_processor_id() in preemptible code"
Cc: Patrick McHardy <kaber@...sh.net>
Cc: "David S. Miller" <davem@...emloft.net>
Signed-off-by: Andrew Morton <akpm@...ux-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
_
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists