]> git.baikalelectronics.ru Git - kernel.git/commit
[NETFILTER]: nf_conntrack: fix helper module unload races
authorPatrick McHarrdy <kaber@trash.net>
Tue, 5 Jun 2007 19:55:27 +0000 (12:55 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 7 Jun 2007 20:40:26 +0000 (13:40 -0700)
commit5f69a7453feae39de043ba78e82061ae7daeab33
tree03c8f9d7fa1e51d852ff6b90c35030491613df03
parent9a7b27a16da2f1f715757adef045c380113b84bc
[NETFILTER]: nf_conntrack: fix helper module unload races

When a helper module is unloaded all conntracks refering to it have their
helper pointer NULLed out, leading to lots of races. In most places this
can be fixed by proper use of RCU (they do already check for != NULL,
but in a racy way), additionally nf_conntrack_expect_related needs to
bail out when no helper is present.

Also remove two paranoid BUG_ONs in nf_conntrack_proto_gre that are racy
and not worth fixing.

Signed-off-by: Patrick McHarrdy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_expect.c
net/netfilter/nf_conntrack_helper.c
net/netfilter/nf_conntrack_netlink.c
net/netfilter/nf_conntrack_proto_gre.c