Skip to contentSkip to conversation

null_blk: Fix missing mutex_destroy() at module removal

PATCH Applied Zhu Yanjun 2 participants 2 messages Apr 25, 2024 Block layer

lore
Share & tools
lore

Zhu Yanjun

author
#0 lore raw

PATCH v3 1/1 null_blk: Fix missing mutex_destroy() at module removal

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")
---
 drivers/block/null_blk/main.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/block/null_blk/main.c +2 -0
index ed33cf7192d2..eed63f95e89d 100644
@@ -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);
Signature · 1 line
2.34.1
maintainer Applied
#1 lore raw
Quoted 4 lines · Zhu Yanjun

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,

Signature · 1 line
Jens Axboe