Patch "PCI: mediatek: Fix refcount leak in mtk_pcie_subsys_powerup()" has been added to the 5.18-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

    PCI: mediatek: Fix refcount leak in mtk_pcie_subsys_powerup()

to the 5.18-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:
     pci-mediatek-fix-refcount-leak-in-mtk_pcie_subsys_po.patch
and it can be found in the queue-5.18 subdirectory.

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



commit 1851f163c6b222d82ccf8214f9d6979b1837ddd1
Author: Miaoqian Lin <linmq006@xxxxxxxxx>
Date:   Wed Mar 9 09:19:52 2022 +0000

    PCI: mediatek: Fix refcount leak in mtk_pcie_subsys_powerup()
    
    [ Upstream commit 214e0d8fe4a813ae6ffd62bc2dfe7544c20914f4 ]
    
    The of_find_compatible_node() function returns a node pointer with
    refcount incremented, We should use of_node_put() on it when done
    Add the missing of_node_put() to release the refcount.
    
    Link: https://lore.kernel.org/r/20220309091953.5630-1-linmq006@xxxxxxxxx
    Fixes: 87e8657ba99c ("PCI: mediatek: Add new method to get shared pcie-cfg base address")
    Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>
    Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
    Reviewed-by: Miles Chen <miles.chen@xxxxxxxxxxxx>
    Acked-by: Rob Herring <robh@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
index ddfbd4aebdec..be8bd919cb88 100644
--- a/drivers/pci/controller/pcie-mediatek.c
+++ b/drivers/pci/controller/pcie-mediatek.c
@@ -1008,6 +1008,7 @@ static int mtk_pcie_subsys_powerup(struct mtk_pcie *pcie)
 					   "mediatek,generic-pciecfg");
 	if (cfg_node) {
 		pcie->cfg = syscon_node_to_regmap(cfg_node);
+		of_node_put(cfg_node);
 		if (IS_ERR(pcie->cfg))
 			return PTR_ERR(pcie->cfg);
 	}



[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