linux/drivers/infiniband/hw
Maor Gottlieb 9b7d4be967 RDMA/mlx5: Fix UMR cleanup on error flow of driver init
The cited commit removed from the cleanup flow of umr the checks
if the resources were created. This could lead to null-ptr-deref
in case that we had failure in mlx5_ib_stage_ib_reg_init stage.

Fix it by adding new state to the umr that can say if the resources
were created or not and check it in the umr cleanup flow before
destroying the resources.

Fixes: 04876c12c1 ("RDMA/mlx5: Move init and cleanup of UMR to umr.c")
Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
Link: https://lore.kernel.org/r/4cfa61386cf202e9ce330e8d228ce3b25a36326e.1661763459.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2022-09-05 14:49:57 +03:00
..
bnxt_re RDMA: Correct duplicated words in comments 2022-06-24 16:52:28 -03:00
cxgb4 RDMA/cxgb4: fix accept failure due to increased cpl_t5_pass_accept_rpl size 2022-08-16 16:20:52 +03:00
efa RDMA/efa: Add support for dmabuf memory regions 2021-10-28 08:58:26 -03:00
erdma RDMA/erdma: Correct the max_qp and max_cq capacities of the device 2022-08-16 16:29:12 +03:00
hfi1 Tracing updates for 5.20 / 6.0 2022-08-05 09:41:12 -07:00
hns RDMA/hns: Remove the num_qpc_timer variable 2022-08-30 10:22:43 +03:00
irdma RDMA/irdma: Fix drain SQ hang with no completion 2022-08-28 12:43:37 +03:00
mlx4 RDMA/mlx4: Avoid flush_scheduled_work() usage 2022-05-20 11:21:00 -03:00
mlx5 RDMA/mlx5: Fix UMR cleanup on error flow of driver init 2022-09-05 14:49:57 +03:00
mthca RDMA/mthca: Delete useless module.h include 2022-01-28 13:03:12 -04:00
ocrdma RDMA: Split kernel-only global device caps from uverbs device caps 2022-04-06 15:02:13 -03:00
qedr v5.20 pull request 2022-08-04 19:54:32 -07:00
qib IB/qib: Fix repeated "in" within comments 2022-07-28 12:50:05 -03:00
usnic RDMA/usnic: Use device_iommu_capable() 2022-06-16 10:15:29 +03:00
vmw_pvrdma RDMA/pvrdma: Remove useless DMA-32 fallback configuration 2022-01-28 10:49:04 -04:00
Makefile RDMA/erdma: Add driver to kernel build environment 2022-07-27 16:04:05 -03:00