netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RDS: fix rds_tcp_init() error path
@ 2016-07-03  8:54 Vegard Nossum
  2016-07-03 11:21 ` Sowmini Varadhan
       [not found] ` <1467536094-23722-1-git-send-email-vegard.nossum-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Vegard Nossum @ 2016-07-03  8:54 UTC (permalink / raw)
  To: santosh.shilimkar, davem; +Cc: sowmini.varadhan, rds-devel, linux-rdma, netdev

If register_pernet_subsys() fails, we shouldn't try to call
unregister_pernet_subsys().

Fixes: 467fa15356 ("RDS-TCP: Support multiple RDS-TCP listen endpoints, one per netns.")
Cc: stable@vger.kernel.org
Cc: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
---
 net/rds/tcp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/rds/tcp.c b/net/rds/tcp.c
index 74ee126..c8a7b4c 100644
--- a/net/rds/tcp.c
+++ b/net/rds/tcp.c
@@ -616,7 +616,7 @@ static int rds_tcp_init(void)
 
 	ret = rds_tcp_recv_init();
 	if (ret)
-		goto out_slab;
+		goto out_pernet;
 
 	ret = rds_trans_register(&rds_tcp_transport);
 	if (ret)
@@ -628,8 +628,9 @@ static int rds_tcp_init(void)
 
 out_recv:
 	rds_tcp_recv_exit();
-out_slab:
+out_pernet:
 	unregister_pernet_subsys(&rds_tcp_net_ops);
+out_slab:
 	kmem_cache_destroy(rds_tcp_conn_slab);
 out:
 	return ret;
-- 
1.9.1

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

* Re: [PATCH] RDS: fix rds_tcp_init() error path
  2016-07-03  8:54 [PATCH] RDS: fix rds_tcp_init() error path Vegard Nossum
@ 2016-07-03 11:21 ` Sowmini Varadhan
       [not found] ` <1467536094-23722-1-git-send-email-vegard.nossum-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Sowmini Varadhan @ 2016-07-03 11:21 UTC (permalink / raw)
  To: Vegard Nossum; +Cc: santosh.shilimkar, davem, rds-devel, linux-rdma, netdev


> If register_pernet_subsys() fails, we shouldn't try to call
> unregister_pernet_subsys().

Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>

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

* Re: [PATCH] RDS: fix rds_tcp_init() error path
       [not found] ` <1467536094-23722-1-git-send-email-vegard.nossum-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2016-07-03 18:34   ` Santosh Shilimkar
  2016-07-04 23:10   ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: Santosh Shilimkar @ 2016-07-03 18:34 UTC (permalink / raw)
  To: Vegard Nossum, davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: sowmini.varadhan-QHcLZuEGTsvQT0dZR+AlfA,
	rds-devel-N0ozoZBvEnrZJqsBc5GL+g,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA

On 7/3/2016 1:54 AM, Vegard Nossum wrote:
> If register_pernet_subsys() fails, we shouldn't try to call
> unregister_pernet_subsys().
>
> Fixes: 467fa15356 ("RDS-TCP: Support multiple RDS-TCP listen endpoints, one per netns.")
> Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Sowmini Varadhan <sowmini.varadhan-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Cc: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
> Signed-off-by: Vegard Nossum <vegard.nossum-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
Acked-by: Santosh Shilimkar <santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] RDS: fix rds_tcp_init() error path
       [not found] ` <1467536094-23722-1-git-send-email-vegard.nossum-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  2016-07-03 18:34   ` Santosh Shilimkar
@ 2016-07-04 23:10   ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2016-07-04 23:10 UTC (permalink / raw)
  To: vegard.nossum-QHcLZuEGTsvQT0dZR+AlfA
  Cc: santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA,
	sowmini.varadhan-QHcLZuEGTsvQT0dZR+AlfA,
	rds-devel-N0ozoZBvEnrZJqsBc5GL+g,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA

From: Vegard Nossum <vegard.nossum-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Date: Sun,  3 Jul 2016 10:54:54 +0200

> If register_pernet_subsys() fails, we shouldn't try to call
> unregister_pernet_subsys().
> 
> Fixes: 467fa15356 ("RDS-TCP: Support multiple RDS-TCP listen endpoints, one per netns.")
> Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Sowmini Varadhan <sowmini.varadhan-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Cc: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
> Signed-off-by: Vegard Nossum <vegard.nossum-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2016-07-04 23:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-03  8:54 [PATCH] RDS: fix rds_tcp_init() error path Vegard Nossum
2016-07-03 11:21 ` Sowmini Varadhan
     [not found] ` <1467536094-23722-1-git-send-email-vegard.nossum-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-07-03 18:34   ` Santosh Shilimkar
2016-07-04 23:10   ` 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).