mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-13 00:20:06 +00:00
[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>
This commit is contained in:
parent
d04b4f8c1c
commit
21f930e4ab
@ -1107,6 +1107,9 @@ void ip_conntrack_cleanup(void)
|
|||||||
schedule();
|
schedule();
|
||||||
goto i_see_dead_people;
|
goto i_see_dead_people;
|
||||||
}
|
}
|
||||||
|
/* wait until all references to ip_conntrack_untracked are dropped */
|
||||||
|
while (atomic_read(&ip_conntrack_untracked.ct_general.use) > 1)
|
||||||
|
schedule();
|
||||||
|
|
||||||
kmem_cache_destroy(ip_conntrack_cachep);
|
kmem_cache_destroy(ip_conntrack_cachep);
|
||||||
kmem_cache_destroy(ip_conntrack_expect_cachep);
|
kmem_cache_destroy(ip_conntrack_expect_cachep);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user