linux-brain/drivers/infiniband/hw/mlx4
Leon Romanovsky 2adbd7559d RDMA/core: Sanitize WQ state received from the userspace
[ Upstream commit f97442887275d11c88c2899e720fe945c1f61488 ]

The mlx4 and mlx5 implemented differently the WQ input checks.  Instead of
duplicating mlx4 logic in the mlx5, let's prepare the input in the central
place.

The mlx5 implementation didn't check for validity of state input.  It is
not real bug because our FW checked that, but still worth to fix.

Fixes: f213c05272 ("IB/uverbs: Add WQ support")
Link: https://lore.kernel.org/r/ac41ad6a81b095b1a8ad453dcf62cf8d3c5da779.1621413310.git.leonro@nvidia.com
Reported-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-14 16:53:27 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ah.c RDMA: Introduce and use GID attr helper to read RoCE L2 fields 2019-05-03 11:10:02 -03:00
alias_GUID.c timekeeping: Use proper clock specifier names in functions 2019-06-22 12:11:27 +02:00
cm.c IB/mlx4: Adjust delayed work when a dup is observed 2020-10-29 09:57:46 +01:00
cq.c RDMA: Check umem pointer validity prior to release 2019-06-20 15:17:59 -04:00
doorbell.c IB: Pass only ib_udata in function prototypes 2019-04-01 15:00:47 -03:00
mad.c IB/mlx4: Fix starvation in paravirt mux/demux 2020-10-29 09:57:46 +01:00
main.c RDMA/mlx4: Do not map the core_clock page to user space unless enabled 2021-06-16 11:59:44 +02:00
mcg.c IB/mlx4: Remove unnecessary parentheses 2018-09-21 12:00:50 -04:00
mlx4_ib.h IB/mlx4: Fix starvation in paravirt mux/demux 2020-10-29 09:57:46 +01:00
mr.c IB/uverbs: Set IOVA on IB MR in uverbs layer 2020-08-21 13:05:31 +02:00
qp.c RDMA/core: Sanitize WQ state received from the userspace 2021-07-14 16:53:27 +02:00
srq.c RDMA: Check umem pointer validity prior to release 2019-06-20 15:17:59 -04:00
sysfs.c mlx4: Use snprintf instead of complicated strcpy 2018-12-06 20:23:06 -07:00