Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 619122be authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Jason Gunthorpe
Browse files

RDMA/hns: Fix PD memory leak for internal allocation



free_pd is allocated internally by the driver hence needs to be freed
internally too or it leaks.

Fixes: 21a428a0 ("RDMA: Handle PD allocations by IB/core")
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Acked-by: default avatarLijun Ou <oulijun@huawei.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent dc1435c0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -899,6 +899,7 @@ static void hns_roce_v1_release_lp_qp(struct hns_roce_dev *hr_dev)
		dev_err(dev, "Destroy cq for mr_free failed(%d)!\n", ret);

	hns_roce_dealloc_pd(&free_mr->mr_free_pd->ibpd, NULL);
	kfree(&free_mr->mr_free_pd->ibpd);
}

static int hns_roce_db_init(struct hns_roce_dev *hr_dev)