[netfilter-cvslog] r3698 - trunk/patch-o-matic-ng/nf_conntrack/linux-2.6/net/netfilter

laforge at netfilter.org laforge at netfilter.org
Tue Feb 15 02:40:14 CET 2005

Author: laforge at netfilter.org
Date: 2005-02-15 02:40:13 +0100 (Tue, 15 Feb 2005)
New Revision: 3698

[NETFILTER]: Avoid warning on CONNTRACK_STAT_INC in destroy_conntrack()

From: Rusty Russell <rusty at rustcorp.com.au>

ip_conntrack_put can be called in any context in theory: in particular,
MASQUERADE will can call it (via ip_ct_selective_cleanup) when an interface
comes up with a different address.

Move the CONNTRACK_STAT_INC inside the lock: it needs preemption disabled.

Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm at osdl.org>
Signed-off-by: David S. Miller <davem at davemloft.net>

Modified: trunk/patch-o-matic-ng/nf_conntrack/linux-2.6/net/netfilter/nf_conntrack_core.c
--- trunk/patch-o-matic-ng/nf_conntrack/linux-2.6/net/netfilter/nf_conntrack_core.c	2005-02-15 01:39:15 UTC (rev 3697)
+++ trunk/patch-o-matic-ng/nf_conntrack/linux-2.6/net/netfilter/nf_conntrack_core.c	2005-02-15 01:40:13 UTC (rev 3698)
@@ -536,6 +536,7 @@
 		kmem_cache_free(nf_conntrack_expect_cachep, ct->master);
+	NF_CT_STAT_INC(delete);
 	if (master)
@@ -544,7 +545,6 @@
 	DEBUGP("destroy_conntrack: returning ct=%p to slab\n", ct);
-	NF_CT_STAT_INC(delete);
 static void death_by_timeout(unsigned long ul_conntrack)

More information about the netfilter-cvslog mailing list