Skip to contentSkip to conversation

netfilter: ctnetlink: fix scheduling while atomic

PATCH Patrick McHardy 2 participants 2 messages Jan 21, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

commit 334055b92c6bf132d7d9ba52fadfdebd71ba586b

Author: Patrick McHardy <[email protected]>
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.

net/netfilter/nf_conntrack_netlink.c +3 -0
index 3dddec6..c32a7e8 100644
@@ -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;
maintainer
#1 lore raw

From: Patrick McHardy <[email protected]>
Date: Wed, 21 Jan 2009 12:01:50 +0100

Quoted 6 lines

netfilter: ctnetlink: fix scheduling while atomic

Caused by call to request_module() while holding nf_conntrack_lock.

Applied, thanks Patrick.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html