From: Patrick McHardy Date: Wed, 26 Nov 2008 11:57:44 +0000 (-0800) Subject: netfilter: ctnetlink: fix GFP_KERNEL allocation under spinlock X-Git-Tag: v2.6.28-rc8~73^2~6 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3ec192559033ed457f0d7856838654c100fc659f;p=linux-2.6-omap-h63xx.git 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. Reported-and-tested-by: Zoltan Borbely Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 3b009a3e854..5f4a6516b3b 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -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])