[D][E][F][CVE-2019-19077][SRU][PATCH 1/1] RDMA: Fix goto target to release the allocated memory

Po-Hsu Lin po-hsu.lin at canonical.com
Fri Dec 6 09:43:52 UTC 2019

From: Navid Emamdoost <navid.emamdoost at gmail.com>


In bnxt_re_create_srq(), when ib_copy_to_udata() fails allocated memory
should be released by goto fail.

Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters")
Link: https://lore.kernel.org/r/20190910222120.16517-1-navid.emamdoost@gmail.com
Signed-off-by: Navid Emamdoost <navid.emamdoost at gmail.com>
Reviewed-by: Jason Gunthorpe <jgg at mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg at mellanox.com>
(cherry picked from commit 4a9d46a9fe14401f21df69cea97c62396d5fb053)
Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.com>
 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index 45622c5..da4f636 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -1452,7 +1452,7 @@ struct ib_srq *bnxt_re_create_srq(struct ib_pd *ib_pd,
 			dev_err(rdev_to_dev(rdev), "SRQ copy to udata failed!");
-			goto exit;
+			goto fail;
 	if (nq)

More information about the kernel-team mailing list