linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] RDMA/rxe: Fix the problem "mutex_destroy missing"
@ 2024-03-14  6:51 Yanjun.Zhu
  2024-03-14  8:03 ` Daisuke Matsuda (Fujitsu)
  2024-04-01 11:45 ` Leon Romanovsky
  0 siblings, 2 replies; 3+ messages in thread
From: Yanjun.Zhu @ 2024-03-14  6:51 UTC (permalink / raw)
  To: zyjzyj2000, jgg, leon, linux-rdma; +Cc: Yanjun.Zhu

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>
---
 drivers/infiniband/sw/rxe/rxe.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
index 54c723a6edda..6f9ec8db014c 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 */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH 1/1] RDMA/rxe: Fix the problem "mutex_destroy missing"
  2024-03-14  6:51 [PATCH 1/1] RDMA/rxe: Fix the problem "mutex_destroy missing" Yanjun.Zhu
@ 2024-03-14  8:03 ` Daisuke Matsuda (Fujitsu)
  2024-04-01 11:45 ` Leon Romanovsky
  1 sibling, 0 replies; 3+ messages in thread
From: Daisuke Matsuda (Fujitsu) @ 2024-03-14  8:03 UTC (permalink / raw)
  To: 'Yanjun.Zhu', zyjzyj2000, jgg, leon, linux-rdma

On Thu, March 14, 2024 3:52 PM Yanjun.Zhu wrote:
> 
> 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>
> ---
>  drivers/infiniband/sw/rxe/rxe.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
> index 54c723a6edda..6f9ec8db014c 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 */
> --
> 2.34.1
> 

That's right.
Reviewed-by: Daisuke Matsuda <matsuda-daisuke@fujitsu.com>

Daisuke


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] RDMA/rxe: Fix the problem "mutex_destroy missing"
  2024-03-14  6:51 [PATCH 1/1] RDMA/rxe: Fix the problem "mutex_destroy missing" Yanjun.Zhu
  2024-03-14  8:03 ` Daisuke Matsuda (Fujitsu)
@ 2024-04-01 11:45 ` Leon Romanovsky
  1 sibling, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2024-04-01 11:45 UTC (permalink / raw)
  To: zyjzyj2000, jgg, linux-rdma, Yanjun.Zhu


On Thu, 14 Mar 2024 07:51:40 +0100, Yanjun.Zhu wrote:
> When a mutex lock is not used any more, the function mutex_destroy
> should be called to mark the mutex lock uninitialized.
> 
> 

Applied, thanks!

[1/1] RDMA/rxe: Fix the problem "mutex_destroy missing"
      https://git.kernel.org/rdma/rdma/c/481047d7e8391d

Best regards,
-- 
Leon Romanovsky <leon@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-01 11:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-14  6:51 [PATCH 1/1] RDMA/rxe: Fix the problem "mutex_destroy missing" Yanjun.Zhu
2024-03-14  8:03 ` Daisuke Matsuda (Fujitsu)
2024-04-01 11:45 ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).