Commit 67820de3 authored by Jason Gunthorpe's avatar Jason Gunthorpe Committed by Leon Romanovsky
Browse files

RDMA/hns: Add missing comp_mask check in create_qp



hns has a comp_mask field that was never checked for validity, check
it.

Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@nvidia.com>
parent 676b5707
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1130,7 +1130,9 @@ static int set_qp_param(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp,
	}

	if (udata) {
		ret = ib_copy_validate_udata_in(udata, *ucmd, reserved);
		ret = ib_copy_validate_udata_in_cm(
			udata, *ucmd, reserved,
			HNS_ROCE_CREATE_QP_MASK_CONGEST_TYPE);
		if (ret)
			return ret;