netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netfilter: fix netfilter_net_init() return
@ 2017-07-18 19:38 Dan Carpenter
  2017-07-18 21:12 ` Florian Westphal
  2017-07-18 21:30 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2017-07-18 19:38 UTC (permalink / raw)
  To: Pablo Neira Ayuso, Florian Westphal
  Cc: Jozsef Kadlecsik, David S. Miller, netfilter-devel, coreteam,
	kernel-janitors

We accidentally return an uninitialized variable.

Fixes: cf56c2f892a8 ("netfilter: remove old pre-netns era hook api")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 368610dbc3c0..974cf2a3795a 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -344,7 +344,7 @@ EXPORT_SYMBOL(nf_nat_decode_session_hook);
 
 static int __net_init netfilter_net_init(struct net *net)
 {
-	int i, h, ret;
+	int i, h;
 
 	for (i = 0; i < ARRAY_SIZE(net->nf.hooks); i++) {
 		for (h = 0; h < NF_MAX_HOOKS; h++)
@@ -362,7 +362,7 @@ static int __net_init netfilter_net_init(struct net *net)
 	}
 #endif
 
-	return ret;
+	return 0;
 }
 
 static void __net_exit netfilter_net_exit(struct net *net)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] netfilter: fix netfilter_net_init() return
  2017-07-18 19:38 [PATCH] netfilter: fix netfilter_net_init() return Dan Carpenter
@ 2017-07-18 21:12 ` Florian Westphal
  2017-07-18 21:30 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 4+ messages in thread
From: Florian Westphal @ 2017-07-18 21:12 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Pablo Neira Ayuso, Florian Westphal, Jozsef Kadlecsik,
	David S. Miller, netfilter-devel, coreteam, kernel-janitors

Dan Carpenter <dan.carpenter@oracle.com> wrote:
> We accidentally return an uninitialized variable.

Ugh, indeed, thanks for the quick fix!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] netfilter: fix netfilter_net_init() return
  2017-07-18 19:38 [PATCH] netfilter: fix netfilter_net_init() return Dan Carpenter
  2017-07-18 21:12 ` Florian Westphal
@ 2017-07-18 21:30 ` Pablo Neira Ayuso
  2017-07-18 21:51   ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Pablo Neira Ayuso @ 2017-07-18 21:30 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Florian Westphal, Jozsef Kadlecsik, David S. Miller,
	netfilter-devel, coreteam, kernel-janitors

David,

Please if you can manually take this into your net tree to expedite
things.

On Tue, Jul 18, 2017 at 10:38:56PM +0300, Dan Carpenter wrote:
> We accidentally return an uninitialized variable.
> 
> Fixes: cf56c2f892a8 ("netfilter: remove old pre-netns era hook api")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>

Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] netfilter: fix netfilter_net_init() return
  2017-07-18 21:30 ` Pablo Neira Ayuso
@ 2017-07-18 21:51   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-07-18 21:51 UTC (permalink / raw)
  To: pablo; +Cc: dan.carpenter, fw, kadlec, netfilter-devel, coreteam,
	kernel-janitors

From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Tue, 18 Jul 2017 23:30:42 +0200

> David,
> 
> Please if you can manually take this into your net tree to expedite
> things.
> 
> On Tue, Jul 18, 2017 at 10:38:56PM +0300, Dan Carpenter wrote:
>> We accidentally return an uninitialized variable.
>> 
>> Fixes: cf56c2f892a8 ("netfilter: remove old pre-netns era hook api")
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>

Ok, applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-07-18 21:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-18 19:38 [PATCH] netfilter: fix netfilter_net_init() return Dan Carpenter
2017-07-18 21:12 ` Florian Westphal
2017-07-18 21:30 ` Pablo Neira Ayuso
2017-07-18 21:51   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).