* netfilter: ctnetlink: fix scheduling while atomic
@ 2009-01-21 11:01 Patrick McHardy
2009-01-21 20:20 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Patrick McHardy @ 2009-01-21 11:01 UTC (permalink / raw)
To: David S. Miller; +Cc: Netfilter Development Mailinglist, Linux Netdev List
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 01.diff --]
[-- Type: text/x-patch; name="01.diff", Size: 1064 bytes --]
commit 334055b92c6bf132d7d9ba52fadfdebd71ba586b
Author: Patrick McHardy <kaber@trash.net>
Date: Wed Jan 21 11:59:14 2009 +0100
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>
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-21 20:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-21 11:01 netfilter: ctnetlink: fix scheduling while atomic Patrick McHardy
2009-01-21 20:20 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).