mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
RDMA/hns: Fix a missing rollback in error path of hns_roce_create_qp_common()
[ Upstream commit 444907dd45cbe62fd69398805b6e2c626fab5b3a ]
When ib_copy_to_udata() fails in hns_roce_create_qp_common(),
hns_roce_qp_remove() should be called in the error path to
clean up resources in hns_roce_qp_store().
Fixes: 0f00571f94 ("RDMA/hns: Use new SQ doorbell register for HIP09")
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20250311084857.3803665-6-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
21c3be4924
commit
7b2603ab2f
@@ -1213,7 +1213,7 @@ static int hns_roce_create_qp_common(struct hns_roce_dev *hr_dev,
|
||||
min(udata->outlen, sizeof(resp)));
|
||||
if (ret) {
|
||||
ibdev_err(ibdev, "copy qp resp failed!\n");
|
||||
goto err_store;
|
||||
goto err_flow_ctrl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user