]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/core: Free DIM memory in error unwind
authorLeon Romanovsky <leonro@mellanox.com>
Thu, 30 Jul 2020 08:27:19 +0000 (11:27 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2020 07:58:46 +0000 (09:58 +0200)
commit67a153c6a469d8741a160ef45f22f2f39f45b8c3
treea1c0cc049cbfbce7bbac32ceb61e9a8d0e9e9120
parent70a7bf39aa0d4c920245bf394e13b2b8d3ff5d80
RDMA/core: Free DIM memory in error unwind

[ Upstream commit fb448ce87a4a9482b084e67faf804aec79ed9b43 ]

The memory allocated for the DIM wasn't freed in in error unwind path, fix
it by calling to rdma_dim_destroy().

Fixes: da6629793aa6 ("RDMA/core: Provide RDMA DIM support for ULPs")
Link: https://lore.kernel.org/r/20200730082719.1582397-4-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com <mailto:maxg@mellanox.com>>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/core/cq.c