Patch "nvme-pci: fixing memory leak in probe teardown path" has been added to the 6.2-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-pci: fixing memory leak in probe teardown path

to the 6.2-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-pci-fixing-memory-leak-in-probe-teardown-path.patch
and it can be found in the queue-6.2 subdirectory.

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



commit 860bef73f1b1ac8f1e4fc9b878215fe33a1799ae
Author: Irvin Cote <irvincoteg@xxxxxxxxx>
Date:   Wed Mar 8 18:05:08 2023 -0300

    nvme-pci: fixing memory leak in probe teardown path
    
    [ Upstream commit a61d265533b7fe0026a02a49916aa564ffe38e4c ]
    
    In case the nvme_probe teardown path is triggered the ctrl ref count does
    not reach 0 thus creating a memory leak upon failure of nvme_probe.
    
    Signed-off-by: Irvin Cote <irvincoteg@xxxxxxxxx>
    Signed-off-by: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 29c902b9aecbd..c51ebbee8103e 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3126,6 +3126,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	nvme_dev_unmap(dev);
 out_uninit_ctrl:
 	nvme_uninit_ctrl(&dev->ctrl);
+	nvme_put_ctrl(&dev->ctrl);
 	return result;
 }
 



[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