public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] IB/core: Fix missed clean call in registration path
@ 2016-02-21 16:12 Leon Romanovsky
       [not found] ` <1456071146-28101-1-git-send-email-leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Leon Romanovsky @ 2016-02-21 16:12 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky

In case of failure returned from query function in
IB device registration, we need to clean IB cache which
was missed.

This change fixes it.

Fixes: 3e153a93a1c1 ('IB/core: Save the device attributes on the device
structure')
Signed-off-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 drivers/infiniband/core/device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 00da80e..94b80a5 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -358,6 +358,7 @@ int ib_register_device(struct ib_device *device,
 	ret = device->query_device(device, &device->attrs, &uhw);
 	if (ret) {
 		printk(KERN_WARNING "Couldn't query the device attributes\n");
+		ib_cache_cleanup_one(device);
 		goto out;
 	}
 
-- 
2.1.4

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

end of thread, other threads:[~2016-03-03 22:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-21 16:12 [PATCH] IB/core: Fix missed clean call in registration path Leon Romanovsky
     [not found] ` <1456071146-28101-1-git-send-email-leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-02-22  1:13   ` ira.weiny
     [not found]     ` <20160222011334.GA24657-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-02-22  8:53       ` Leon Romanovsky
     [not found]         ` <20160222085327.GO30450-2ukJVAZIZ/Y@public.gmane.org>
2016-02-22  9:12           ` Or Gerlitz
     [not found]             ` <CAJ3xEMjVPQ6yiy4PHp2DDeygk9nBgvQJTB5EZ49ac0HUSgUdcw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-22  9:25               ` Leon Romanovsky
2016-02-22  8:31   ` Sagi Grimberg
     [not found]     ` <56CAC744.9090809-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-03-03 22:03       ` Doug Ledford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox