lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tencent_E9EF29CDB2286A690EB871B78BFE62491908@qq.com>
Date: Mon, 21 Jul 2025 12:17:32 +0800
From: jackysliu <1972843537@...com>
To: maddy@...ux.ibm.com
Cc: mpe@...erman.id.au,
	npiggin@...il.com,
	christophe.leroy@...roup.eu,
	1972843537@...com,
	linuxppc-dev@...ts.ozlabs.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] powerpc : fix resource leak in holly_init_IRQ()

From: Siyang Liu <1972843537@...com>

When the 'pic-router' device node lookup fails in holly_init_IRQ(),
the function returns without releasing the previously acquired
'tsi_pci' node. This violates the device tree reference counting
rules and causes a resource leak.

This issue was detected by rule based static tools
developed by Tencent.

Signed-off-by: Siyang Liu <1972843537@...com>
---
 arch/powerpc/platforms/embedded6xx/holly.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
index ce9e58ee9754..fefb7fd2365f 100644
--- a/arch/powerpc/platforms/embedded6xx/holly.c
+++ b/arch/powerpc/platforms/embedded6xx/holly.c
@@ -178,6 +178,7 @@ static void __init holly_init_IRQ(void)
 	cascade_node = of_find_node_by_type(NULL, "pic-router");
 	if (cascade_node == NULL) {
 		printk(KERN_ERR "%s: No tsi108 pci cascade node found !\n", __func__);
+		of_node_put(tsi_pci);
 		return;
 	}
 
-- 
2.43.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ