linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: sysctl: cleanup net_sysctl_init error exit paths
@ 2019-05-16 15:23 George G. Davis
  2019-05-16 21:27 ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: George G. Davis @ 2019-05-16 15:23 UTC (permalink / raw)
  To: David S. Miller, open list:NETWORKING [GENERAL], open list
  Cc: George G. Davis

Unwind net_sysctl_init error exit goto spaghetti code

Suggested-by: Joshua Frkuska <joshua_frkuska@mentor.com>
Signed-off-by: George G. Davis <george_davis@mentor.com>
---
 net/sysctl_net.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/net/sysctl_net.c b/net/sysctl_net.c
index 9aed6fe1bf1a..7710a2d7f79a 100644
--- a/net/sysctl_net.c
+++ b/net/sysctl_net.c
@@ -104,14 +104,12 @@ __init int net_sysctl_init(void)
 	if (!net_header)
 		goto out;
 	ret = register_pernet_subsys(&sysctl_pernet_ops);
-	if (ret)
-		goto out1;
-out:
-	return ret;
-out1:
+	if (!ret)
+		goto out;
 	unregister_sysctl_table(net_header);
 	net_header = NULL;
-	goto out;
+out:
+	return ret;
 }
 
 struct ctl_table_header *register_net_sysctl(struct net *net,
-- 
2.7.4


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

* Re: [PATCH] net: sysctl: cleanup net_sysctl_init error exit paths
  2019-05-16 15:23 [PATCH] net: sysctl: cleanup net_sysctl_init error exit paths George G. Davis
@ 2019-05-16 21:27 ` David Miller
  2019-05-17 14:43   ` George G. Davis
  0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2019-05-16 21:27 UTC (permalink / raw)
  To: george_davis; +Cc: netdev, linux-kernel

From: "George G. Davis" <george_davis@mentor.com>
Date: Thu, 16 May 2019 11:23:08 -0400

> Unwind net_sysctl_init error exit goto spaghetti code
> 
> Suggested-by: Joshua Frkuska <joshua_frkuska@mentor.com>
> Signed-off-by: George G. Davis <george_davis@mentor.com>

Cleanups are not appropriate until the net-next tree opens back up.

So please resubmit at that time.

Thank you.

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

* Re: [PATCH] net: sysctl: cleanup net_sysctl_init error exit paths
  2019-05-16 21:27 ` David Miller
@ 2019-05-17 14:43   ` George G. Davis
  2019-07-08 22:47     ` George G. Davis
  0 siblings, 1 reply; 7+ messages in thread
From: George G. Davis @ 2019-05-17 14:43 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-kernel

Hello David,

On Thu, May 16, 2019 at 02:27:44PM -0700, David Miller wrote:
> From: "George G. Davis" <george_davis@mentor.com>
> Date: Thu, 16 May 2019 11:23:08 -0400
> 
> > Unwind net_sysctl_init error exit goto spaghetti code
> > 
> > Suggested-by: Joshua Frkuska <joshua_frkuska@mentor.com>
> > Signed-off-by: George G. Davis <george_davis@mentor.com>
> 
> Cleanups are not appropriate until the net-next tree opens back up.
> 
> So please resubmit at that time.

I fear that I may be distracted by other shiny objects by then but
I'll make a reminder and try to resubmit during the next merge window.

Thanks!

> 
> Thank you.

-- 
Regards,
George

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

* Re: [PATCH] net: sysctl: cleanup net_sysctl_init error exit paths
  2019-05-17 14:43   ` George G. Davis
@ 2019-07-08 22:47     ` George G. Davis
  2019-09-17 15:53       ` George G. Davis
  0 siblings, 1 reply; 7+ messages in thread
From: George G. Davis @ 2019-07-08 22:47 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-kernel

Hello David,

On Fri, May 17, 2019 at 10:43:45AM -0400, George G. Davis wrote:
> Hello David,
> 
> On Thu, May 16, 2019 at 02:27:44PM -0700, David Miller wrote:
> > From: "George G. Davis" <george_davis@mentor.com>
> > Date: Thu, 16 May 2019 11:23:08 -0400
> > 
> > > Unwind net_sysctl_init error exit goto spaghetti code
> > > 
> > > Suggested-by: Joshua Frkuska <joshua_frkuska@mentor.com>
> > > Signed-off-by: George G. Davis <george_davis@mentor.com>
> > 
> > Cleanups are not appropriate until the net-next tree opens back up.
> > 
> > So please resubmit at that time.
> 
> I fear that I may be distracted by other shiny objects by then but
> I'll make a reminder and try to resubmit during the next merge window.

Since the "Linux 5.2" kernel has been released [1], I'm guessing that the
net-next merge window is open now? If yes, the patch remains unchanged
since my initial post. Please consider applying or let me know when to
resubmit when the net-next merge window is again open.

TIA!


> 
> Thanks!
> 
> > 
> > Thank you.
> 
> -- 
> Regards,
> George

-- 
Regards,
George
[1] https://lwn.net/Articles/792995/

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

* Re: [PATCH] net: sysctl: cleanup net_sysctl_init error exit paths
  2019-07-08 22:47     ` George G. Davis
@ 2019-09-17 15:53       ` George G. Davis
  2019-09-18  9:44         ` Nicolas Dichtel
  0 siblings, 1 reply; 7+ messages in thread
From: George G. Davis @ 2019-09-17 15:53 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-kernel

Hello David,

On Mon, Jul 08, 2019 at 06:47:32PM -0400, George G. Davis wrote:
> Hello David,
> 
> On Fri, May 17, 2019 at 10:43:45AM -0400, George G. Davis wrote:
> > Hello David,
> > 
> > On Thu, May 16, 2019 at 02:27:44PM -0700, David Miller wrote:
> > > From: "George G. Davis" <george_davis@mentor.com>
> > > Date: Thu, 16 May 2019 11:23:08 -0400
> > > 
> > > > Unwind net_sysctl_init error exit goto spaghetti code
> > > > 
> > > > Suggested-by: Joshua Frkuska <joshua_frkuska@mentor.com>
> > > > Signed-off-by: George G. Davis <george_davis@mentor.com>
> > > 
> > > Cleanups are not appropriate until the net-next tree opens back up.
> > > 
> > > So please resubmit at that time.
> > 
> > I fear that I may be distracted by other shiny objects by then but
> > I'll make a reminder and try to resubmit during the next merge window.
> 
> Since the "Linux 5.2" kernel has been released [1], I'm guessing that the
> net-next merge window is open now? If yes, the patch remains unchanged
> since my initial post. Please consider applying or let me know when to
> resubmit when the net-next merge window is again open.

Ping, "Linux 5.3" kernel has been released [1] and it appears that the
5.4 merge window is open. The patch [2] remains unchanged since my initial
post. Please consider applying it.

Thanks!

-- 
Regards,
George
[1] https://lwn.net/Articles/799250/
[2] https://lore.kernel.org/patchwork/patch/1074969/

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

* Re: [PATCH] net: sysctl: cleanup net_sysctl_init error exit paths
  2019-09-17 15:53       ` George G. Davis
@ 2019-09-18  9:44         ` Nicolas Dichtel
  2019-09-18 15:00           ` George G. Davis
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Dichtel @ 2019-09-18  9:44 UTC (permalink / raw)
  To: George G. Davis, David Miller; +Cc: netdev, linux-kernel

Le 17/09/2019 à 17:53, George G. Davis a écrit :
[snip]
> Ping, "Linux 5.3" kernel has been released [1] and it appears that the
> 5.4 merge window is open. The patch [2] remains unchanged since my initial
> post. Please consider applying it.

net-next is closed:
http://vger.kernel.org/~davem/net-next.html

You will have to resend the patch when net-next opens.

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

* Re: [PATCH] net: sysctl: cleanup net_sysctl_init error exit paths
  2019-09-18  9:44         ` Nicolas Dichtel
@ 2019-09-18 15:00           ` George G. Davis
  0 siblings, 0 replies; 7+ messages in thread
From: George G. Davis @ 2019-09-18 15:00 UTC (permalink / raw)
  To: Nicolas Dichtel; +Cc: David Miller, netdev, linux-kernel

Hello Nicolas,

On Wed, Sep 18, 2019 at 11:44:55AM +0200, Nicolas Dichtel wrote:
> Le 17/09/2019 à 17:53, George G. Davis a écrit :
> [snip]
> > Ping, "Linux 5.3" kernel has been released [1] and it appears that the
> > 5.4 merge window is open. The patch [2] remains unchanged since my initial
> > post. Please consider applying it.
> 
> net-next is closed:
> http://vger.kernel.org/~davem/net-next.html
> 
> You will have to resend the patch when net-next opens.

Thanks! I'll watch for the "net-next is OPEN" announcment and resubmit then.

-- 
Regards,
George

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

end of thread, other threads:[~2019-09-18 15:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-16 15:23 [PATCH] net: sysctl: cleanup net_sysctl_init error exit paths George G. Davis
2019-05-16 21:27 ` David Miller
2019-05-17 14:43   ` George G. Davis
2019-07-08 22:47     ` George G. Davis
2019-09-17 15:53       ` George G. Davis
2019-09-18  9:44         ` Nicolas Dichtel
2019-09-18 15:00           ` George G. Davis

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).