summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2005-12-05 13:36:50 -0800
committerDavid S. Miller <davem@davemloft.net>2005-12-05 13:36:50 -0800
commit6636568cf85ef5898a892e90fcc88b61cca9ca27 (patch)
tree5e2be9dbd35853c55198a64c3261ab3bfe15e804 /net
parenta79575633300adb5d3f1bd856cc518c45fefcb86 (diff)
downloadlinux-3.10-6636568cf85ef5898a892e90fcc88b61cca9ca27.tar.gz
linux-3.10-6636568cf85ef5898a892e90fcc88b61cca9ca27.tar.bz2
linux-3.10-6636568cf85ef5898a892e90fcc88b61cca9ca27.zip
[NETFILTER]: Wait for untracked references in nf_conntrack module unload
Noticed by Pablo Neira <pablo@eurodev.net>. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 1da678303d7..a7c7b490cf2 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1383,6 +1383,9 @@ void nf_conntrack_cleanup(void)
schedule();
goto i_see_dead_people;
}
+ /* wait until all references to nf_conntrack_untracked are dropped */
+ while (atomic_read(&nf_conntrack_untracked.ct_general.use) > 1)
+ schedule();
for (i = 0; i < NF_CT_F_NUM; i++) {
if (nf_ct_cache[i].use == 0)