aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorZhu Yanjun2024-04-25 19:16:35 +0200
committerJens Axboe2024-04-25 14:15:00 -0600
commit07d1b99825f40f9c0d93e6b99d79a08d0717bac1 (patch)
treef72e97cb8d552a20d68efba34ad4b9bb8376830b /drivers
parentbf4f776d9f906c36acb473b3e449e97b3938fc55 (diff)
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") Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev> Link: https://lore.kernel.org/r/20240425171635.4227-1-yanjun.zhu@linux.dev Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/null_blk/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
index bccee438b4b7..8c0e5e3fd1ed 100644
--- a/drivers/block/null_blk/main.c
+++ b/drivers/block/null_blk/main.c
@@ -2127,6 +2127,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);