linux/drivers/infiniband/hw
Maor Gottlieb e899389029 RDMA/mlx5: Fix MR cache memory leak
If the MR cache entry invalidation failed, then we detach this entry from
the cache, therefore we must to free the memory as well.

Allcation backtrace for the leaker:

    [<00000000d8e423b0>] alloc_cache_mr+0x23/0xc0 [mlx5_ib]
    [<000000001f21304c>] create_cache_mr+0x3f/0xf0 [mlx5_ib]
    [<000000009d6b45dc>] mlx5_ib_alloc_implicit_mr+0x41/0×210 [mlx5_ib]
    [<00000000879d0d68>] mlx5_ib_reg_user_mr+0x9e/0×6e0 [mlx5_ib]
    [<00000000be74bf89>] create_qp+0x2fc/0xf00 [ib_uverbs]
    [<000000001a532d22>] ib_uverbs_handler_UVERBS_METHOD_COUNTERS_READ+0x1d9/0×230 [ib_uverbs]
    [<0000000070f46001>] rdma_alloc_commit_uobject+0xb5/0×120 [ib_uverbs]
    [<000000006d8a0b38>] uverbs_alloc+0x2b/0xf0 [ib_uverbs]
    [<00000000075217c9>] ksysioctl+0x234/0×7d0
    [<00000000eb5c120b>] __x64_sys_ioctl+0x16/0×20
    [<00000000db135b48>] do_syscall_64+0x59/0×2e0

Fixes: 1769c4c575 ("RDMA/mlx5: Always remove MRs from the cache before destroying them")
Link: https://lore.kernel.org/r/20201213132940.345554-2-leon@kernel.org
Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2020-12-14 15:14:27 -04:00
..
bnxt_re RDMA/bnxt_re: Fix max_qp_wrs reported 2020-12-07 15:43:42 -04:00
cxgb4 RDMA/cxgb4: Validate the number of CQEs 2020-11-23 16:19:46 -04:00
efa RDMA/efa: Use dma_set_mask_and_coherent() to simplify code 2020-12-01 21:03:23 -04:00
hfi1 Linux 5.10-rc6 2020-12-01 20:40:50 -04:00
hns RDMA/hns: Simplify AEQE process for different types of queue 2020-12-11 15:21:35 -04:00
i40iw RDMA/i40iw: Replace atomic_add_return(1, ..) 2020-12-07 15:40:23 -04:00
mlx4 RDMA/mlx4: Remove bogus dev_base_lock usage 2020-12-10 16:58:25 -04:00
mlx5 RDMA/mlx5: Fix MR cache memory leak 2020-12-14 15:14:27 -04:00
mthca Linux 5.10-rc6 2020-12-01 20:40:50 -04:00
ocrdma RDMA: Convert sysfs device * show functions to use sysfs_emit() 2020-10-26 19:53:21 -03:00
qedr IB/qedr: Fix fall-through warnings for Clang 2020-11-23 15:54:11 -04:00
qib IB/qib: Use dma_set_mask_and_coherent to simplify code 2020-11-23 16:37:20 -04:00
usnic RDMA: Convert various random sprintf sysfs _show uses to sysfs_emit 2020-10-30 21:03:52 -03:00
vmw_pvrdma Merge branch 'for-rc' into rdma.git 2020-11-17 15:20:26 -04:00
Makefile RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel 2019-10-04 15:08:59 -03:00