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


Groups > linux.kernel > #1200343 > unrolled thread

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

Started byJoe Stringer <joestringer@nicira.com>
First post2015-08-05 03:40 +0200
Last post2015-08-05 10:50 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [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

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

FromJoe Stringer <joestringer@nicira.com>
Date2015-08-05 03:40 +0200
Subject[PATCH net] netfilter: conntrack: Use flags in nf_ct_tmpl_alloc()
Message-ID<pTVQu-3dW-35@gated-at.bofh.it>
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/

[toc] | [next] | [standalone]


#1200345

FromJoe Stringer <joestringer@nicira.com>
Date2015-08-05 03:40 +0200
Message-ID<pTVQx-3dW-77@gated-at.bofh.it>
In reply to#1200343
On 4 August 2015 at 18:34, Joe Stringer <joestringer@nicira.com> wrote:
> 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>

s/net/nf/ in subject line.
--
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/

[toc] | [prev] | [next] | [standalone]


#1200536

FromPablo Neira Ayuso <pablo@netfilter.org>
Date2015-08-05 10:50 +0200
Message-ID<pU2yC-4zf-21@gated-at.bofh.it>
In reply to#1200343
On Tue, Aug 04, 2015 at 06:34:00PM -0700, Joe Stringer wrote:
> The flags were ignored for this function when it was introduced. Also
> fix the style problem in kzalloc.

Applied, thanks Joe.

--
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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web