]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_ct_ecache: fix crash with multiple containers, one shutting down
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 5 Jul 2012 13:42:10 +0000 (15:42 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 9 Jul 2012 08:53:19 +0000 (10:53 +0200)
commita595d1deea381285114c22cb6726386242230b17
tree823387dda7be307c75c21688cc899f7937fb2c59
parentd92bcf73798f60d7204598f2707e340822d121fe
netfilter: nf_ct_ecache: fix crash with multiple containers, one shutting down

Hans reports that he's still hitting:

BUG: unable to handle kernel NULL pointer dereference at 000000000000027c
IP: [<ffffffff813615db>] netlink_has_listeners+0xb/0x60
PGD 0
Oops: 0000 [#3] PREEMPT SMP
CPU 0

It happens when adding a number of containers with do:

nfct_query(h, NFCT_Q_CREATE, ct);

and most likely one namespace shuts down.

this problem was supposed to be fixed by:
3bff326 netfilter: nf_conntrack: make event callback registration per-netns

Still, it was missing one rcu_access_pointer to check if the callback
is set or not.

Reported-by: Hans Schillstrom <hans@schillstrom.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack_ecache.h