RDMA/restrack: Release MR restrack when delete
authorMark Zhang <markzhang@nvidia.com>
Mon, 7 Nov 2022 08:51:34 +0000 (10:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:32 +0000 (13:32 +0100)
commit8731cb5c7820bef577bab4ff17691fbf61c671cb
tree7f7418d9e08db6d663bb8e1dac6cd9f1cc9764a6
parentcf968790a08f8218dc777818e3e7e332021e2c91
RDMA/restrack: Release MR restrack when delete

[ Upstream commit dac153f2802db1ad46207283cb9b2aae3d707a45 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/core/restrack.c