Re: [PATCH 1/1] null_blk: Fix the problem "mutex_destroy missing"

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

 



在 2024/4/25 17:38, Zhu Yanjun 写道:
When a mutex lock is not used any more, the function mutex_destroy
should be called to mark the mutex lock uninitialized.


Sorry. Fixes tag is missing.
I will send out the V2 with this Fixes tag.

Zhu Yanjun

Signed-off-by: Zhu Yanjun <yanjun.zhu@xxxxxxxxx>
---
  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);





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux