Patch "nvme-core: fix dev_pm_qos memleak" has been added to the 6.3-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

    nvme-core: fix dev_pm_qos memleak

to the 6.3-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:
     nvme-core-fix-dev_pm_qos-memleak.patch
and it can be found in the queue-6.3 subdirectory.

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



commit 1c56f20a2f2a76d43433add23e7f1910efae153e
Author: Chaitanya Kulkarni <kch@xxxxxxxxxx>
Date:   Fri Apr 28 00:31:15 2023 -0700

    nvme-core: fix dev_pm_qos memleak
    
    [ Upstream commit 7ed5cf8e6d9bfb6a78d0471317edff14f0f2b4dd ]
    
    Call dev_pm_qos_hide_latency_tolerance() in the error unwind patch to
    avoid following kmemleak:-
    
    blktests (master) # kmemleak-clear; ./check nvme/044;
    blktests (master) # kmemleak-scan ; kmemleak-show
    nvme/044 (Test bi-directional authentication)                [passed]
        runtime  2.111s  ...  2.124s
    unreferenced object 0xffff888110c46240 (size 96):
      comm "nvme", pid 33461, jiffies 4345365353 (age 75.586s)
      hex dump (first 32 bytes):
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
      backtrace:
        [<0000000069ac2cec>] kmalloc_trace+0x25/0x90
        [<000000006acc66d5>] dev_pm_qos_update_user_latency_tolerance+0x6f/0x100
        [<00000000cc376ea7>] nvme_init_ctrl+0x38e/0x410 [nvme_core]
        [<000000007df61b4b>] 0xffffffffc05e88b3
        [<00000000d152b985>] 0xffffffffc05744cb
        [<00000000f04a4041>] vfs_write+0xc5/0x3c0
        [<00000000f9491baf>] ksys_write+0x5f/0xe0
        [<000000001c46513d>] do_syscall_64+0x3b/0x90
        [<00000000ecf348fe>] entry_SYSCALL_64_after_hwframe+0x72/0xdc
    
    Link: https://lore.kernel.org/linux-nvme/CAHj4cs-nDaKzMx2txO4dbE+Mz9ePwLtU0e3egz+StmzOUgWUrA@xxxxxxxxxxxxxx/
    Fixes: f50fff73d620 ("nvme: implement In-Band authentication")
    Signed-off-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>
    Tested-by: Yi Zhang <yi.zhang@xxxxxxxxxx>
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Reviewed-by: Sagi Grimberg <sagi@xxxxxxxxxxx>
    Signed-off-by: Keith Busch <kbusch@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index f07fd2fed3f9d..8d8403b65e1b3 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -5250,6 +5250,7 @@ int nvme_init_ctrl(struct nvme_ctrl *ctrl, struct device *dev,
 	return 0;
 out_free_cdev:
 	nvme_fault_inject_fini(&ctrl->fault_inject);
+	dev_pm_qos_hide_latency_tolerance(ctrl->device);
 	cdev_device_del(&ctrl->cdev, ctrl->device);
 out_free_name:
 	nvme_put_ctrl(ctrl);



[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