[azure:x/azure-edge:x,6/6] UBUNTU: SAUCE: vmbus-rdma: ND144: do not crash on idr allocation failure - warn instead
diff mbox series

Message ID 1518623897-18991-7-git-send-email-marcelo.cerri@canonical.com
State New
Headers show
Series
  • Fixes for Network Direct InfiniBand/RDMA driver
Related show

Commit Message

Marcelo Henrique Cerri Feb. 14, 2018, 3:58 p.m. UTC
From: Long Li <longli@microsoft.com>

BugLink: http://bugs.launchpad.net/bugs/1749332

Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
---
 drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-144.0/vmbus_rdma.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-144.0/vmbus_rdma.h b/drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-144.0/vmbus_rdma.h
index 78e534fa8748..1cbf7a749437 100644
--- a/drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-144.0/vmbus_rdma.h
+++ b/drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-144.0/vmbus_rdma.h
@@ -1922,7 +1922,7 @@  static inline int insert_handle(struct hvnd_dev *dev, struct idr *idr,
 	spin_unlock_irqrestore(&dev->id_lock, flags);
 	idr_preload_end();
 
-	BUG_ON(ret == -ENOSPC);
+	WARN(ret < 0, "Failed to allocate for id=%d ret=%d\n", id, ret);
 	return ret < 0 ? ret : 0;
 }