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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250616162154.9057-1-astewart@tektelic.com>
Date: Mon, 16 Jun 2025 10:21:54 -0600
From: Aidan Stewart <astewart@...telic.com>
To: gregkh@...uxfoundation.org,
	jirislaby@...nel.org
Cc: tony@...mide.com,
	linux-serial@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Aidan Stewart <astewart@...telic.com>,
	stable@...r.kernel.org
Subject: [PATCH] serial: core: restore of_node information in sysfs

Since in v6.8-rc1, the of_node symlink under tty devices is
missing. This breaks any udev rules relying on this information.

Link the of_node information in the serial controller device with the
parent defined in the device tree. This will also apply to the serial
device which takes the serial controller as a parent device.

Fixes: b286f4e87e32 ("serial: core: Move tty and serdev to be children of serial core port device")
Cc: stable@...r.kernel.org
Signed-off-by: Aidan Stewart <astewart@...telic.com>
---
 drivers/tty/serial/serial_base_bus.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c
index 5d1677f1b651..0e4bf7a3e775 100644
--- a/drivers/tty/serial/serial_base_bus.c
+++ b/drivers/tty/serial/serial_base_bus.c
@@ -73,6 +73,10 @@ static int serial_base_device_init(struct uart_port *port,
 	dev->bus = &serial_base_bus_type;
 	dev->release = release;
 
+	if (IS_ENABLED(CONFIG_OF)) {
+		device_set_of_node_from_dev(dev, parent_dev);
+	}
+
 	if (!serial_base_initialized) {
 		dev_dbg(port->dev, "uart_add_one_port() called before arch_initcall()?\n");
 		return -EPROBE_DEFER;
-- 
2.49.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ