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: 8700e3e7c4 ("Soft RoCE driver")
Signed-off-by: Yanjun.Zhu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Daisuke Matsuda <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
Yanjun.Zhu 2024-03-14 07:51:40 +01:00 • committed by Greg Kroah-Hartman
commit 80997511b9

View file

@ -72,6 +72,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 */