]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_conntrack: fix BUG_ON while removing nf_conntrack with netns
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 10 Jan 2013 15:12:01 +0000 (16:12 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 12 Jan 2013 13:12:36 +0000 (14:12 +0100)
commitc0b966d15f7ea226c6ede79a43f44f7dac62b869
tree09596b40accfa9adcf21f7b0a26f99cee7d4e0e7
parente2e3d451d6438c4e3ecd7d88b825548f7d856539
netfilter: nf_conntrack: fix BUG_ON while removing nf_conntrack with netns

canqun zhang reported that we're hitting BUG_ON in the
nf_conntrack_destroy path when calling kfree_skb while
rmmod'ing the nf_conntrack module.

Currently, the nf_ct_destroy hook is being set to NULL in the
destroy path of conntrack.init_net. However, this is a problem
since init_net may be destroyed before any other existing netns
(we cannot assume any specific ordering while releasing existing
netns according to what I read in recent emails).

Thanks to Gao feng for initial patch to address this issue.

Reported-by: canqun zhang <canqunzhang@gmail.com>
Acked-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack_core.h
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_standalone.c