提交 21f930e4 编写于 作者: P Patrick McHardy 提交者: David S. Miller

[NETFILTER]: Wait until all references to ip_conntrack_untracked are dropped on unload

Fixes a crash when unloading ip_conntrack.
Signed-off-by: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d04b4f8c
...@@ -1107,6 +1107,9 @@ void ip_conntrack_cleanup(void) ...@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册