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

RDMA/efa: Fix typo in efa_alloc_mr()



The pattern is to check the entire driver request space, not just
sizeof something unrelated.

Fixes: 40909f66 ("RDMA/efa: Add EFA verbs implementation")
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Link: https://patch.msgid.link/1-v1-83e918d69e73+a9-rdma_udata_rc_jgg@nvidia.com


Acked-by: default avatarMichael Margolin <mrgolin@amazon.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent fd80bd71
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1661,7 +1661,7 @@ static struct efa_mr *efa_alloc_mr(struct ib_pd *ibpd, int access_flags,
	struct efa_mr *mr;

	if (udata && udata->inlen &&
	    !ib_is_udata_cleared(udata, 0, sizeof(udata->inlen))) {
	    !ib_is_udata_cleared(udata, 0, udata->inlen)) {
		ibdev_dbg(&dev->ibdev,
			  "Incompatible ABI params, udata not cleared\n");
		return ERR_PTR(-EINVAL);