Skip to content

Commit 07d1b99

Browse files
zhuyjaxboe
authored andcommitted
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: f2298c0 ("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>
1 parent bf4f776 commit 07d1b99

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/block/null_blk/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2127,6 +2127,8 @@ static void __exit null_exit(void)
21272127

21282128
if (tag_set.ops)
21292129
blk_mq_free_tag_set(&tag_set);
2130+
2131+
mutex_destroy(&lock);
21302132
}
21312133

21322134
module_init(null_init);

0 commit comments

Comments
 (0)