summaryrefslogtreecommitdiff
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorYanjun.Zhu <yanjun.zhu@linux.dev>2024-03-14 09:51:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-27 18:07:08 +0300
commit196617d07dd66d7d53de5ce1ca934e8ed92b5d13 (patch)
tree132b36d02476c56b681ad53766bb6e1454317594 /drivers/infiniband
parent45e811bab2d088a43fb5199e4cc2900d64363df7 (diff)
downloadlinux-196617d07dd66d7d53de5ce1ca934e8ed92b5d13.tar.xz
RDMA/rxe: Fix the problem "mutex_destroy missing"
[ Upstream commit 481047d7e8391d3842ae59025806531cdad710d9 ] When a mutex lock is not used any more, the function mutex_destroy should be called to mark the mutex lock uninitialized. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Yanjun.Zhu <yanjun.zhu@linux.dev> Link: https://lore.kernel.org/r/20240314065140.27468-1-yanjun.zhu@linux.dev Reviewed-by: Daisuke Matsuda <matsuda-daisuke@fujitsu.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/sw/rxe/rxe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
index 51daac5c4feb..be3ddfbf3cae 100644
--- a/drivers/infiniband/sw/rxe/rxe.c
+++ b/drivers/infiniband/sw/rxe/rxe.c
@@ -33,6 +33,8 @@ void rxe_dealloc(struct ib_device *ib_dev)
if (rxe->tfm)
crypto_free_shash(rxe->tfm);
+
+ mutex_destroy(&rxe->usdev_lock);
}
/* initialize rxe device parameters */