All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] IB/ipoib: Remove device when one port fails to init
@ 2017-09-25 12:18 Yuval Shaia
       [not found] ` <1506341880-41082-1-git-send-email-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Yuval Shaia @ 2017-09-25 12:18 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	leonro-VPRAkNaXOzVWk0Htik3J/w,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA, valex-VPRAkNaXOzVWk0Htik3J/w,
	erezsh-VPRAkNaXOzVWk0Htik3J/w,
	dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w,
	ferasda-VPRAkNaXOzVWk0Htik3J/w,
	shamir.rabinovitch-QHcLZuEGTsvQT0dZR+AlfA,
	pabeni-H+wXaHxf7aLQT0dZR+AlfA,
	dsa-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

Call ipoib_remove_one when one of the IPoIB ports fails to initialize in
order not to leave the module in unstable state.

Signed-off-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/ulp/ipoib/ipoib_main.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index a6bcd78..5ffd2c3 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -2295,7 +2295,8 @@ static void ipoib_add_one(struct ib_device *device)
 	}
 
 	if (!count) {
-		kfree(dev_list);
+		pr_err("Failed to init port, removing it\n");
+		ipoib_remove_one(device, dev_list);
 		return;
 	}
 
-- 
1.7.1

--
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 related	[flat|nested] 2+ messages in thread

* Re: [PATCH] IB/ipoib: Remove device when one port fails to init
       [not found] ` <1506341880-41082-1-git-send-email-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2017-09-27 13:48   ` Doug Ledford
  0 siblings, 0 replies; 2+ messages in thread
From: Doug Ledford @ 2017-09-27 13:48 UTC (permalink / raw)
  To: Yuval Shaia, sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	leonro-VPRAkNaXOzVWk0Htik3J/w, valex-VPRAkNaXOzVWk0Htik3J/w,
	erezsh-VPRAkNaXOzVWk0Htik3J/w,
	dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w,
	ferasda-VPRAkNaXOzVWk0Htik3J/w,
	shamir.rabinovitch-QHcLZuEGTsvQT0dZR+AlfA,
	pabeni-H+wXaHxf7aLQT0dZR+AlfA,
	dsa-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Mon, 2017-09-25 at 05:18 -0700, Yuval Shaia wrote:
> Call ipoib_remove_one when one of the IPoIB ports fails to initialize
> in
> order not to leave the module in unstable state.
> 
> Signed-off-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

Thanks, applied.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

--
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] 2+ messages in thread

end of thread, other threads:[~2017-09-27 13:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-25 12:18 [PATCH] IB/ipoib: Remove device when one port fails to init Yuval Shaia
     [not found] ` <1506341880-41082-1-git-send-email-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-09-27 13:48   ` Doug Ledford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.