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: <20260117062814.440540-1-geoffreyhe2@gmail.com>
Date: Sat, 17 Jan 2026 06:28:14 +0000
From: Weigang He <geoffreyhe2@...il.com>
To: tony@...mide.com,
	aaro.koskinen@....fi,
	andreas@...nade.info,
	khilman@...libre.com,
	rogerq@...nel.org
Cc: linux-omap@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Weigang He <geoffreyhe2@...il.com>,
	stable@...r.kernel.org
Subject: [PATCH] bus: ti-sysc: fix reference count leak on module unload

The stdout_path static variable holds a reference to a device_node
obtained from of_find_node_by_path(). When the ti-sysc module is
unloaded, this reference is never released, causing a reference count
leak.

Add of_node_put(stdout_path) in sysc_exit() to properly release the
device_node reference when the module is unloaded.

Fixes: 3bb37c8e6e6a ("bus: ti-sysc: Handle stdout-path for debug console")
Cc: stable@...r.kernel.org
Signed-off-by: Weigang He <geoffreyhe2@...il.com>
---
 drivers/bus/ti-sysc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index fd631a9889c1e..822b9b1b2f6fa 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -3338,6 +3338,9 @@ module_init(sysc_init);
 
 static void __exit sysc_exit(void)
 {
+	if (!IS_ERR_OR_NULL(stdout_path))
+		of_node_put(stdout_path);
+
 	bus_unregister_notifier(&platform_bus_type, &sysc_nb);
 	platform_driver_unregister(&sysc_driver);
 	sysc_cleanup_static_data();
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ