Patch "powerpc/pci_dn: Add missing of_node_put()" has been added to the 5.15-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

    powerpc/pci_dn: Add missing of_node_put()

to the 5.15-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:
     powerpc-pci_dn-add-missing-of_node_put.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 55e82bb9b1626a6b206f1207ea356886c1d0f63e
Author: Liang He <windhl@xxxxxxx>
Date:   Fri Jul 1 21:17:50 2022 +0800

    powerpc/pci_dn: Add missing of_node_put()
    
    [ Upstream commit 110a1fcb6c4d55144d8179983a475f17a1d6f832 ]
    
    In pci_add_device_node_info(), use of_node_put() to drop the reference
    to 'parent' returned by of_get_parent() to keep refcount balance.
    
    Fixes: cca87d303c85 ("powerpc/pci: Refactor pci_dn")
    Co-authored-by: Miaoqian Lin <linmq006@xxxxxxxxx>
    Signed-off-by: Liang He <windhl@xxxxxxx>
    Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Reviewed-by: Tyrel Datwyler <tyreld@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220701131750.240170-1-windhl@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c
index 61571ae23953..335767cea137 100644
--- a/arch/powerpc/kernel/pci_dn.c
+++ b/arch/powerpc/kernel/pci_dn.c
@@ -330,6 +330,7 @@ struct pci_dn *pci_add_device_node_info(struct pci_controller *hose,
 	INIT_LIST_HEAD(&pdn->list);
 	parent = of_get_parent(dn);
 	pdn->parent = parent ? PCI_DN(parent) : NULL;
+	of_node_put(parent);
 	if (pdn->parent)
 		list_add_tail(&pdn->list, &pdn->parent->child_list);
 



[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