Skip to contentSkip to conversation

netfilter: ctnetlink: fix GFP_KERNEL allocation under spinlock

PATCH Applied Patrick McHardy 2 participants 2 messages Nov 26, 2008

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

This patch for 2.6.28 fixes a GFP_KERNEL allocation under spinlock in ctnetlink that was missed in the conntrack creation race fix.

Please apply, thanks.

commit 49a12376315f651decfa67c07041e2d0c2e04968

Author: Patrick McHardy <[email protected]>
Date:   Wed Nov 26 12:16:50 2008 +0100

netfilter: ctnetlink: fix GFP_KERNEL allocation under spinlock

The previous fix for the conntrack creation race (netfilter: ctnetlink:
fix conntrack creation race) missed a GFP_KERNEL allocation that is now performed while holding a spinlock. Switch to GFP_ATOMIC.

net/netfilter/nf_conntrack_netlink.c +1 -1
index 3b009a3..5f4a651 100644
@@ -1138,7 +1138,7 @@ ctnetlink_create_conntrack(struct nlattr *cda[],
 		}
 	}
 
-	nf_ct_acct_ext_add(ct, GFP_KERNEL);
+	nf_ct_acct_ext_add(ct, GFP_ATOMIC);
 
 #if defined(CONFIG_NF_CONNTRACK_MARK)
 	if (cda[CTA_MARK])
maintainer Applied
#1 lore raw

From: Patrick McHardy <[email protected]>
Date: Wed, 26 Nov 2008 12:23:08 +0100

Quoted 4 lines

This patch for 2.6.28 fixes a GFP_KERNEL allocation under spinlock in ctnetlink that was missed in the conntrack creation race fix.

Please apply, thanks.

Applied, thanks Patrick.