diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-03-05 20:22:51 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-03-06 14:43:49 -0500 |
commit | 8be619d1e430fd87a02587a2a6830b692cb91b84 (patch) | |
tree | 580ca289a8e79a18dc8140e2077d67d29bebcae5 /net | |
parent | 848edc69192a38bf9d261032f248b14f47e6af8b (diff) |
netfilter: ctnetlink: remove incorrect spin_[un]lock_bh on NAT module autoload
Since 7d367e0, ctnetlink_new_conntrack is called without holding
the nf_conntrack_lock spinlock. Thus, ctnetlink_parse_nat_setup
does not require to release that spinlock anymore in the NAT module
autoload case.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 30c9d4ca0218..10687692831e 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -1041,16 +1041,13 @@ ctnetlink_parse_nat_setup(struct nf_conn *ct, | |||
1041 | if (!parse_nat_setup) { | 1041 | if (!parse_nat_setup) { |
1042 | #ifdef CONFIG_MODULES | 1042 | #ifdef CONFIG_MODULES |
1043 | rcu_read_unlock(); | 1043 | rcu_read_unlock(); |
1044 | spin_unlock_bh(&nf_conntrack_lock); | ||
1045 | nfnl_unlock(); | 1044 | nfnl_unlock(); |
1046 | if (request_module("nf-nat-ipv4") < 0) { | 1045 | if (request_module("nf-nat-ipv4") < 0) { |
1047 | nfnl_lock(); | 1046 | nfnl_lock(); |
1048 | spin_lock_bh(&nf_conntrack_lock); | ||
1049 | rcu_read_lock(); | 1047 | rcu_read_lock(); |
1050 | return -EOPNOTSUPP; | 1048 | return -EOPNOTSUPP; |
1051 | } | 1049 | } |
1052 | nfnl_lock(); | 1050 | nfnl_lock(); |
1053 | spin_lock_bh(&nf_conntrack_lock); | ||
1054 | rcu_read_lock(); | 1051 | rcu_read_lock(); |
1055 | if (nfnetlink_parse_nat_setup_hook) | 1052 | if (nfnetlink_parse_nat_setup_hook) |
1056 | return -EAGAIN; | 1053 | return -EAGAIN; |