diff options
author | Patrick McHardy <kaber@trash.net> | 2005-07-22 15:51:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-22 15:51:03 -0400 |
commit | 21f930e4abdcb9649f26e5b959c14dddee4e600b (patch) | |
tree | 524b3bfee593f20a52fab80c7bb4da3ac0ad3ad8 /net/ipv4 | |
parent | d04b4f8c1c9766e49fad6a141fc61cb30db69a5c (diff) |
[NETFILTER]: Wait until all references to ip_conntrack_untracked are dropped on unload
Fixes a crash when unloading ip_conntrack.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c index 14af55cad5d6..63bf88264980 100644 --- a/net/ipv4/netfilter/ip_conntrack_core.c +++ b/net/ipv4/netfilter/ip_conntrack_core.c | |||
@@ -1107,6 +1107,9 @@ void ip_conntrack_cleanup(void) | |||
1107 | schedule(); | 1107 | schedule(); |
1108 | goto i_see_dead_people; | 1108 | goto i_see_dead_people; |
1109 | } | 1109 | } |
1110 | /* wait until all references to ip_conntrack_untracked are dropped */ | ||
1111 | while (atomic_read(&ip_conntrack_untracked.ct_general.use) > 1) | ||
1112 | schedule(); | ||
1110 | 1113 | ||
1111 | kmem_cache_destroy(ip_conntrack_cachep); | 1114 | kmem_cache_destroy(ip_conntrack_cachep); |
1112 | kmem_cache_destroy(ip_conntrack_expect_cachep); | 1115 | kmem_cache_destroy(ip_conntrack_expect_cachep); |