Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1200343

[PATCH net] netfilter: conntrack: Use flags in nf_ct_tmpl_alloc()

Path csiph.com!au2pb.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!weretis.net!feeder1.news.weretis.net!newsfeed.CARNet.hr!news.spin.it!bofh.it!news.nic.it!robomod
From Joe Stringer <joestringer@nicira.com>
Newsgroups linux.kernel
Subject [PATCH net] netfilter: conntrack: Use flags in nf_ct_tmpl_alloc()
Date Wed, 05 Aug 2015 03:40:02 +0200
Message-ID <pTVQu-3dW-35@gated-at.bofh.it> (permalink)
X-Original-To pablo@netfilter.org
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NU20Lz1dTYEta1hdNr8tUiSNoogsnCdZ+gwHC5VuMwA=; b=Zxz9TueGmIk3UfvFIv5aNVwzi85HRF79i6IHrl/8KctGCnHWeHb+aEHELP0mhAcg5a Xs2OaalNYrnKTxeQq+E0BAO1LSAVguAXWIV23iblw21KZWz0a7D1xCCXkicDYeDKmT3t XNr/9+2dquR8AMXNLjLOLTwEwjSCWxRMgyVN8fbqJxRogkThGisEwm0uVU7aR7RmC9Mq bOXuQFj6+g47LGPuAPa9rJ63hGdFn39A7O0rHAMy0jIVJdIHLyUd9KwnQ7fB7TCU9CIy mXvIlykQA+quA1CS5LLZu1+buk1AAOJKTJ+aTlSNgjrVFVkRtJooDlP7rBSn1j2MhkDY 1M2w==
X-Gm-Message-State ALoCoQni4tAxXzYcGuAoqFIgj9MDIJXzrcdH1wyEz4moL07n0C0a/5Go6A2DLu7dQeaq6n+cjQRz
X-Received by 10.66.251.202 with SMTP id zm10mr13964499pac.87.1438738453041; Tue, 04 Aug 2015 18:34:13 -0700 (PDT)
X-Mailer git-send-email 2.1.4
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 40
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org
X-Original-Date Tue, 4 Aug 2015 18:34:00 -0700
X-Original-Message-ID <1438738440-5320-1-git-send-email-joestringer@nicira.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1200343

Show key headers only | View raw


The flags were ignored for this function when it was introduced. Also
fix the style problem in kzalloc.

Fixes: 0838aa7fc (netfilter: fix netns dependencies with conntrack
templates)
Signed-off-by: Joe Stringer <joestringer@nicira.com>
---
 net/netfilter/nf_conntrack_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index f168099..3c20d02 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -292,7 +292,7 @@ struct nf_conn *nf_ct_tmpl_alloc(struct net *net, u16 zone, gfp_t flags)
 {
 	struct nf_conn *tmpl;
 
-	tmpl = kzalloc(sizeof(struct nf_conn), GFP_KERNEL);
+	tmpl = kzalloc(sizeof(*tmpl), flags);
 	if (tmpl == NULL)
 		return NULL;
 
@@ -303,7 +303,7 @@ struct nf_conn *nf_ct_tmpl_alloc(struct net *net, u16 zone, gfp_t flags)
 	if (zone) {
 		struct nf_conntrack_zone *nf_ct_zone;
 
-		nf_ct_zone = nf_ct_ext_add(tmpl, NF_CT_EXT_ZONE, GFP_ATOMIC);
+		nf_ct_zone = nf_ct_ext_add(tmpl, NF_CT_EXT_ZONE, flags);
 		if (!nf_ct_zone)
 			goto out_free;
 		nf_ct_zone->id = zone;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH net] netfilter: conntrack: Use flags in nf_ct_tmpl_alloc() Joe Stringer <joestringer@nicira.com> - 2015-08-05 03:40 +0200
  Re: [PATCH net] netfilter: conntrack: Use flags in nf_ct_tmpl_alloc() Joe Stringer <joestringer@nicira.com> - 2015-08-05 03:40 +0200
  Re: [PATCH net] netfilter: conntrack: Use flags in nf_ct_tmpl_alloc() Pablo Neira Ayuso <pablo@netfilter.org> - 2015-08-05 10:50 +0200

csiph-web