]> git.baikalelectronics.ru Git - kernel.git/commit
[NETFILTER]: ip_conntrack: fix NAT helper unload races
authorPatrick McHardy <kaber@trash.net>
Wed, 29 Nov 2006 01:35:25 +0000 (02:35 +0100)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 3 Dec 2006 05:31:22 +0000 (21:31 -0800)
commitfc5a6ffb69b028be20185c57f420680de2a0aec8
tree95b2d47e55db3991f66090525b7e28455a6ca39b
parentcd36374554b7795b68f2c931967cb05c7a099731
[NETFILTER]: ip_conntrack: fix NAT helper unload races

The NAT helpr hooks are protected by RCU, but all of the
conntrack helpers test and use the global pointers instead
of copying them first using rcu_dereference()

Also replace synchronize_net() by synchronize_rcu() for clarity
since sychronizing only with packet receive processing is
insufficient to prevent races.

Signed-off-by: Patrick McHardy <kaber@trash.net>
15 files changed:
net/ipv4/netfilter/ip_conntrack_amanda.c
net/ipv4/netfilter/ip_conntrack_ftp.c
net/ipv4/netfilter/ip_conntrack_helper_h323.c
net/ipv4/netfilter/ip_conntrack_helper_pptp.c
net/ipv4/netfilter/ip_conntrack_irc.c
net/ipv4/netfilter/ip_conntrack_sip.c
net/ipv4/netfilter/ip_conntrack_tftp.c
net/ipv4/netfilter/ip_nat_amanda.c
net/ipv4/netfilter/ip_nat_ftp.c
net/ipv4/netfilter/ip_nat_helper_h323.c
net/ipv4/netfilter/ip_nat_helper_pptp.c
net/ipv4/netfilter/ip_nat_irc.c
net/ipv4/netfilter/ip_nat_sip.c
net/ipv4/netfilter/ip_nat_tftp.c
net/netfilter/nf_conntrack_ftp.c