* [patch 9/9] Avoid warning on CONNTRACK_STAT_INC in destroy_conntrack()
@ 2004-10-28 7:19 akpm
2004-10-28 23:49 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2004-10-28 7:19 UTC (permalink / raw)
To: davem; +Cc: jgarzik, netdev, akpm, rusty
From: Rusty Russell <rusty@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@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
25-akpm/net/ipv4/netfilter/ip_conntrack_core.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -puN net/ipv4/netfilter/ip_conntrack_core.c~avoid-warning-on-conntrack_stat_inc-in-destroy_conntrack net/ipv4/netfilter/ip_conntrack_core.c
--- 25/net/ipv4/netfilter/ip_conntrack_core.c~avoid-warning-on-conntrack_stat_inc-in-destroy_conntrack 2004-10-28 00:17:08.778469456 -0700
+++ 25-akpm/net/ipv4/netfilter/ip_conntrack_core.c 2004-10-28 00:17:08.782468848 -0700
@@ -312,6 +312,7 @@ destroy_conntrack(struct nf_conntrack *n
}
kmem_cache_free(ip_conntrack_expect_cachep, ct->master);
}
+ CONNTRACK_STAT_INC(delete);
WRITE_UNLOCK(&ip_conntrack_lock);
if (master)
@@ -320,7 +321,6 @@ destroy_conntrack(struct nf_conntrack *n
DEBUGP("destroy_conntrack: returning ct=%p to slab\n", ct);
kmem_cache_free(ip_conntrack_cachep, ct);
atomic_dec(&ip_conntrack_count);
- CONNTRACK_STAT_INC(delete);
}
static void death_by_timeout(unsigned long ul_conntrack)
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 9/9] Avoid warning on CONNTRACK_STAT_INC in destroy_conntrack()
2004-10-28 7:19 [patch 9/9] Avoid warning on CONNTRACK_STAT_INC in destroy_conntrack() akpm
@ 2004-10-28 23:49 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-10-28 23:49 UTC (permalink / raw)
To: akpm; +Cc: jgarzik, netdev, akpm, rusty
On Thu, 28 Oct 2004 00:19:48 -0700
akpm@osdl.org wrote:
> From: Rusty Russell <rusty@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@rustcorp.com.au>
> Signed-off-by: Andrew Morton <akpm@osdl.org>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-28 23:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-28 7:19 [patch 9/9] Avoid warning on CONNTRACK_STAT_INC in destroy_conntrack() akpm
2004-10-28 23:49 ` David S. Miller
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).