Commit 8be619d1 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso Committed by David S. Miller

netfilter: ctnetlink: remove incorrect spin_[un]lock_bh on NAT module autoload

Since 7d367e06, 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: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 848edc69
...@@ -1041,16 +1041,13 @@ ctnetlink_parse_nat_setup(struct nf_conn *ct, ...@@ -1041,16 +1041,13 @@ ctnetlink_parse_nat_setup(struct nf_conn *ct,
if (!parse_nat_setup) { if (!parse_nat_setup) {
#ifdef CONFIG_MODULES #ifdef CONFIG_MODULES
rcu_read_unlock(); rcu_read_unlock();
spin_unlock_bh(&nf_conntrack_lock);
nfnl_unlock(); nfnl_unlock();
if (request_module("nf-nat-ipv4") < 0) { if (request_module("nf-nat-ipv4") < 0) {
nfnl_lock(); nfnl_lock();
spin_lock_bh(&nf_conntrack_lock);
rcu_read_lock(); rcu_read_lock();
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
nfnl_lock(); nfnl_lock();
spin_lock_bh(&nf_conntrack_lock);
rcu_read_lock(); rcu_read_lock();
if (nfnetlink_parse_nat_setup_hook) if (nfnetlink_parse_nat_setup_hook)
return -EAGAIN; return -EAGAIN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment