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: <200707101703.36173.yinghai.lu@sun.com>
Date:	Tue, 10 Jul 2007 17:03:35 -0700
From:	Yinghai Lu <Yinghai.Lu@....COM>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	Russell King <rmk@....linux.org.uk>,
	Bjorn Helgaas <bjorn.helgaas@...com>, Andi Kleen <ak@...e.de>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [PATCH] serial: do not add port that is not initialized

[PATCH] serial: do not add port that is not initialized

if the port is not initialized with correct iobase, and membase, we don't
need to add that port.
for x86, when pnpacpi is enabled, we will not get extra ttyS1/ttyS2/ttyS3 in
/sys/devices/platform/serial8250/tty

Sign-off-by: Yinghai Lu <yinghai.lu@....com>

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index c84dab0..6399014 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2425,9 +2425,12 @@ serial8250_register_ports(struct uart_driver *drv, struct device *dev)
 	for (i = 0; i < nr_uarts; i++) {
 		struct uart_8250_port *up = &serial8250_ports[i];
 
+		if (!up->port.iobase && !up->port.membase)
+			continue;
 		up->port.dev = dev;
 		uart_add_one_port(drv, &up->port);
 	}
+
 }
 
 #ifdef CONFIG_SERIAL_8250_CONSOLE

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ