diff options
author | Mark Zhang <markzhang@nvidia.com> | 2022-11-07 11:51:34 +0300 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2022-11-15 10:56:32 +0300 |
commit | dac153f2802db1ad46207283cb9b2aae3d707a45 (patch) | |
tree | 6137906a3a564df8f2c6271dc54d251120134379 /drivers/infiniband/core | |
parent | 3574cfdca28543e2e8db649297cd6659ea8e4bb8 (diff) | |
download | linux-dac153f2802db1ad46207283cb9b2aae3d707a45.tar.xz |
RDMA/restrack: Release MR restrack when delete
The MR restrack also needs to be released when delete it, otherwise it
cause memory leak as the task struct won't be released.
Fixes: 13ef5539def7 ("RDMA/restrack: Count references to the verbs objects")
Signed-off-by: Mark Zhang <markzhang@nvidia.com>
Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
Link: https://lore.kernel.org/r/703db18e8d4ef628691fb93980a709be673e62e3.1667810736.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/restrack.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/infiniband/core/restrack.c b/drivers/infiniband/core/restrack.c index 1f935d9f6178..01a499a8b88d 100644 --- a/drivers/infiniband/core/restrack.c +++ b/drivers/infiniband/core/restrack.c @@ -343,8 +343,6 @@ void rdma_restrack_del(struct rdma_restrack_entry *res) rt = &dev->res[res->type]; old = xa_erase(&rt->xa, res->id); - if (res->type == RDMA_RESTRACK_MR) - return; WARN_ON(old != res); out: |