Skip to content

Commit

Permalink
RDMA/rxe: Fix the problem "mutex_destroy missing"
Browse files Browse the repository at this point in the history
[ Upstream commit 481047d ]

When a mutex lock is not used any more, the function mutex_destroy
should be called to mark the mutex lock uninitialized.

Fixes: 8700e3e ("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>
  • Loading branch information
Yanjun.Zhu authored and gregkh committed Apr 27, 2024
1 parent 7517032 commit 99a7ccc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/infiniband/sw/rxe/rxe.c
Expand Up @@ -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 */
Expand Down

0 comments on commit 99a7ccc

Please sign in to comment.