Patch "null_blk: Fix missing mutex_destroy() at module removal" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    null_blk: Fix missing mutex_destroy() at module removal

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     null_blk-fix-missing-mutex_destroy-at-module-removal.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a9fdd79c7111aa87b5eab6933eb5c1716f5f96e2
Author: Zhu Yanjun <yanjun.zhu@xxxxxxxxx>
Date:   Thu Apr 25 19:16:35 2024 +0200

    null_blk: Fix missing mutex_destroy() at module removal
    
    [ Upstream commit 07d1b99825f40f9c0d93e6b99d79a08d0717bac1 ]
    
    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@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20240425171635.4227-1-yanjun.zhu@xxxxxxxxx
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
index 36755f263e8ec..3584f389b92ce 100644
--- a/drivers/block/null_blk/main.c
+++ b/drivers/block/null_blk/main.c
@@ -2372,6 +2372,8 @@ static void __exit null_exit(void)
 
 	if (g_queue_mode == NULL_Q_MQ && shared_tags)
 		blk_mq_free_tag_set(&tag_set);
+
+	mutex_destroy(&lock);
 }
 
 module_init(null_init);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux