mirror_ubuntu-kernels/drivers/infiniband/hw/mlx5
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
..
ah.c RDMA: Restore ability to fail on AH destroy 2020-09-09 13:57:22 -03:00
cmd.c IB/mlx5: Enable UAR to have DevX UID 2021-09-28 18:31:21 +03:00
cmd.h IB/mlx5: Enable UAR to have DevX UID 2021-09-28 18:31:21 +03:00
cong.c net/mlx5: Move debugfs entries to separate struct 2022-03-09 13:33:02 -08:00
counters.c RDMA/mlx5: fix build error with INFINIBAND_USER_ACCESS=n 2021-10-25 14:16:05 -03:00
counters.h RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
cq.c RDMA/mlx5: Add a umr recovery flow 2022-06-07 12:57:41 +03:00
devx.c v5.18 merge window pull request 2022-03-24 19:17:39 -07:00
devx.h RDMA/mlx5: Attach ndescs to mlx5_ib_mkey 2021-10-19 14:42:53 +03:00
dm.c RDMA/mlx5: Support handling of modify-header pattern ICM area 2022-06-13 14:58:01 -07:00
dm.h RDMA/mlx5: Expose UAPI to query DM 2021-04-13 19:36:37 -03:00
doorbell.c net: Don't include filter.h from net/sock.h 2021-12-29 08:48:14 -08:00
fs.c RDMA/mlx5: Add missing check for return value in get namespace flow 2022-08-02 13:57:27 -03:00
fs.h RDMA/mlx5: Separate flow steering logic from main.c 2020-07-07 14:05:51 -03:00
gsi.c net/mlx5: Lag, expose number of lag ports 2022-05-09 22:54:00 -07:00
ib_rep.c RDMA/mlx5: Add shared FDB support 2021-08-05 13:49:24 -07:00
ib_rep.h RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
ib_virt.c RDMA/mlx5: Delete useless module.h include 2022-01-28 13:03:12 -04:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
mad.c RDMA/mlx5: Set local port to one when accessing counters 2022-09-05 14:49:53 +03:00
main.c RDMA/mlx5: Rely on RoCE fw cap instead of devlink when setting profile 2022-09-05 14:49:46 +03:00
Makefile RDMA/mlx5: Move init and cleanup of UMR to umr.c 2022-04-25 11:52:59 -03:00
mem.c RDMA/mlx5: Delete useless module.h include 2022-01-28 13:03:12 -04:00
mlx5_ib.h RDMA/mlx5: Fix UMR cleanup on error flow of driver init 2022-09-05 14:49:57 +03:00
mr.c RDMA/mlx5: Rename the mkey cache variables and functions 2022-07-27 14:45:48 -03:00
odp.c RDMA/mlx5: Rename the mkey cache variables and functions 2022-07-27 14:45:48 -03:00
qos.c RDMA/core: Allow the ioctl layer to abort a fully created uobject 2020-05-21 20:10:46 -03:00
qp.c v5.19 pull request 2022-05-26 21:08:40 -07:00
qp.h RDMA: Restore ability to return error for destroy WQ 2020-09-09 14:14:29 -03:00
qpc.c net/mlx5: Use mlx5_cmd_do() in core create_{cq,dct} 2022-02-23 15:21:59 -08:00
restrack.c RDMA/mlx5: Assign dev to DM MR 2020-12-07 15:52:54 -04:00
restrack.h RDMA/mlx5: Separate restrack callbacks initialization from main.c 2020-07-07 14:05:51 -03:00
srq_cmd.c RDMA/mlx5: Lower setting the umem's PAS for SRQ 2020-11-16 16:53:30 -04:00
srq.c RDMA/mlx5: Delete useless module.h include 2022-01-28 13:03:12 -04:00
srq.h RDMA/mlx5: Lower setting the umem's PAS for SRQ 2020-11-16 16:53:30 -04:00
std_types.c RDMA/mlx5: Fill port info based on the relevant eswitch 2021-08-05 13:49:24 -07:00
umr.c RDMA/mlx5: Fix UMR cleanup on error flow of driver init 2022-09-05 14:49:57 +03:00
umr.h RDMA/mlx5: Clean UMR QP type flow from mlx5_ib_post_send() 2022-04-25 12:00:10 -03:00
wr.c RDMA/mlx5: Clean UMR QP type flow from mlx5_ib_post_send() 2022-04-25 12:00:10 -03:00
wr.h RDMA/mlx5: Expose wqe posting helpers outside of wr.c 2022-04-25 11:53:00 -03:00