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

Marcelo Henrique Cerri marcelo.cerri at canonical.com
Wed Feb 14 15:58:17 UTC 2018


From: Long Li <longli at microsoft.com>

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

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

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;
 }
 
-- 
2.7.4





More information about the kernel-team mailing list