Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

RDMA/irdma: Add missing comp_mask check in alloc_ucontext

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

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Jacob Moroni <jmoroni@google.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

authored by

Jason Gunthorpe and committed by
Leon Romanovsky
69309e17 67820de3

+3 -1
+3 -1
drivers/infiniband/hw/irdma/verbs.c
··· 296 296 if (udata->outlen < IRDMA_ALLOC_UCTX_MIN_RESP_LEN) 297 297 return -EINVAL; 298 298 299 - ret = ib_copy_validate_udata_in(udata, req, rsvd8); 299 + ret = ib_copy_validate_udata_in_cm(udata, req, rsvd8, 300 + IRDMA_ALLOC_UCTX_USE_RAW_ATTR | 301 + IRDMA_SUPPORT_WQE_FORMAT_V2); 300 302 if (ret) 301 303 return ret; 302 304