mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
RDMA/cxgb4: Don't free chunk that we have failed to allocate
In the error path of registering memory when there's a failure to allocate a chunk from the memory pool, we try to free the same chunk we just failed to allocate, which will BUG(). Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
parent
ddffeb8c4d
commit
32c631f9f2
1 changed files with 1 additions and 1 deletions
|
@ -468,7 +468,7 @@ struct ib_mr *c4iw_register_phys_mem(struct ib_pd *pd,
|
||||||
ret = alloc_pbl(mhp, npages);
|
ret = alloc_pbl(mhp, npages);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
kfree(page_list);
|
kfree(page_list);
|
||||||
goto err_pbl;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = write_pbl(&mhp->rhp->rdev, page_list, mhp->attr.pbl_addr,
|
ret = write_pbl(&mhp->rhp->rdev, page_list, mhp->attr.pbl_addr,
|
||||||
|
|
Loading…
Add table
Reference in a new issue