summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYanjun.Zhu <yanjun.zhu@linux.dev>2024-03-14 07:51:40 +0100
committerLeon Romanovsky <leon@kernel.org>2024-04-01 14:36:41 +0300
commit481047d7e8391d3842ae59025806531cdad710d9 (patch)
treecb266b463ae0e3462837f5a047506ccf2f4c042d /drivers
parent39cd87c4eb2b893354f3b850f916353f2658ae6f (diff)
downloadlinux-stable-481047d7e8391d3842ae59025806531cdad710d9.tar.gz
linux-stable-481047d7e8391d3842ae59025806531cdad710d9.tar.bz2
linux-stable-481047d7e8391d3842ae59025806531cdad710d9.zip
RDMA/rxe: Fix the problem "mutex_destroy missing"
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>
Diffstat (limited to 'drivers')
-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 ae466e72fc43..255677bc12b2 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 */