* [PATCH] iw_cxgb4: do not free chunk that we have failed to allocate
@ 2012-10-12 21:10 Thadeu Lima de Souza Cascardo
0 siblings, 0 replies; only message in thread
From: Thadeu Lima de Souza Cascardo @ 2012-10-12 21:10 UTC (permalink / raw)
To: linux-kernel
Cc: Thadeu Lima de Souza Cascardo, Steve Wise, Roland Dreier,
Sean Hefty, Hal Rosenstock, linux-rdma
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.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
---
drivers/infiniband/hw/cxgb4/mem.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c
index 57e07c6..afd8179 100644
--- a/drivers/infiniband/hw/cxgb4/mem.c
+++ b/drivers/infiniband/hw/cxgb4/mem.c
@@ -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,
--
1.7.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-10-12 21:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-12 21:10 [PATCH] iw_cxgb4: do not free chunk that we have failed to allocate Thadeu Lima de Souza Cascardo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®