diff options
author | Patrick McHardy <kaber@trash.net> | 2009-01-21 20:19:49 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 20:19:49 (GMT) |
commit | 748085fcbedbf7b0f38d95e178265d7b13360b44 (patch) | |
tree | 7a8b60e14790e8727f953af55408c9ab293dbd75 /net/netfilter | |
parent | 37fe4732b978eb02e5433387a40f2b61706cebe3 (diff) | |
download | linux-fsl-qoriq-748085fcbedbf7b0f38d95e178265d7b13360b44.tar.xz |
netfilter: ctnetlink: fix scheduling while atomic
Caused by call to request_module() while holding nf_conntrack_lock.
Reported-and-tested-by: Kövesdi György <kgy@teledigit.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 3dddec6..c32a7e8 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -831,13 +831,16 @@ ctnetlink_parse_nat_setup(struct nf_conn *ct, if (!parse_nat_setup) { #ifdef CONFIG_MODULES rcu_read_unlock(); + spin_unlock_bh(&nf_conntrack_lock); nfnl_unlock(); if (request_module("nf-nat-ipv4") < 0) { nfnl_lock(); + spin_lock_bh(&nf_conntrack_lock); rcu_read_lock(); return -EOPNOTSUPP; } nfnl_lock(); + spin_lock_bh(&nf_conntrack_lock); rcu_read_lock(); if (nfnetlink_parse_nat_setup_hook) return -EAGAIN; |