Skip to contentSkip to conversation

iw_cxgb4: do not free chunk that we have failed to allocate

PATCH New Thadeu Lima de Souza Cascardo 1 participant 1 message Oct 12, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iw_cxgb4: do not free chunk that we have failed to allocate

In the error path of registering memory, in case there is a failure when trying to allocate a chunk from the memory pool, it will try to free the same chunk, which will BUG.

---
 drivers/infiniband/hw/cxgb4/mem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/infiniband/hw/cxgb4/mem.c +1 -1
index 57e07c6..afd8179 100644
@@ -468,7 +468,7 @@ struct ib_mr *c4iw_register_phys_mem(struct ib_pd *pd,
 	ret = alloc_pbl(mhp, npages);
 	if (ret) {
 		kfree(page_list);
-		goto err_pbl;
+		goto err;
 	}
 
 	ret = write_pbl(&mhp->rhp->rdev, page_list, mhp->attr.pbl_addr,
Signature · 6 lines
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html