* [PATCH v3 1/1] null_blk: Fix missing mutex_destroy() at module removal
@ 2024-04-25 17:16 Zhu Yanjun
2024-04-25 20:15 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Zhu Yanjun @ 2024-04-25 17:16 UTC (permalink / raw)
To: axboe, dlemoal, linux-block; +Cc: Zhu Yanjun
When a mutex lock is not used any more, the function mutex_destroy
should be called to mark the mutex lock uninitialized.
Fixes: f2298c0403b0 ("null_blk: multi queue aware block test driver")
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
---
drivers/block/null_blk/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
index ed33cf7192d2..eed63f95e89d 100644
--- a/drivers/block/null_blk/main.c
+++ b/drivers/block/null_blk/main.c
@@ -2113,6 +2113,8 @@ static void __exit null_exit(void)
if (tag_set.ops)
blk_mq_free_tag_set(&tag_set);
+
+ mutex_destroy(&lock);
}
module_init(null_init);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3 1/1] null_blk: Fix missing mutex_destroy() at module removal
2024-04-25 17:16 [PATCH v3 1/1] null_blk: Fix missing mutex_destroy() at module removal Zhu Yanjun
@ 2024-04-25 20:15 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2024-04-25 20:15 UTC (permalink / raw)
To: dlemoal, linux-block, Zhu Yanjun
On Thu, 25 Apr 2024 19:16:35 +0200, Zhu Yanjun 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] null_blk: Fix missing mutex_destroy() at module removal
commit: 07d1b99825f40f9c0d93e6b99d79a08d0717bac1
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-25 20:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-25 17:16 [PATCH v3 1/1] null_blk: Fix missing mutex_destroy() at module removal Zhu Yanjun
2024-04-25 20:15 ` Jens Axboe
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).