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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 Oct 2016 14:55:50 +0200
From:   Mike Galbraith <umgwanakikbuti@...il.com>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>,
        Rob Herring <robh@...nel.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Niklas Söderlund 
        <niklas.soderlund+renesas@...natech.se>,
        Mugunthan V N <mugunthanvnm@...com>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Peter Hurley <peter@...leysoftware.com>,
        Alan Cox <alan@...ux.intel.com>, Jiri Slaby <jslaby@...e.com>,
        "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>
Subject: Re: [PATCH] serial: core: fix console problems on uart_close

On Tue, 2016-10-25 at 12:40 +0200, Geert Uytterhoeven wrote:

> Mike: I see you are using a PC, while I'm using an ARM board (with DT).
> Are you using a serial console? If yes, what's the value of port->console
> before and after the call to uart_console() that Rob's patch below removes?

Well, it's a bit larger than the average PC, it's a 64 core HP DL980,
and my console is its virtual serial port.

[   15.217487] Serial: 8250/16550 driver, 32 ports, IRQ sharing disabled
[   15.228212] MIKE port:ffff880276400000 port->console:0
[   15.240889] MIKE port:ffff880276400000 port->console:0
[   15.269606] 00:03: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[   15.282538] MIKE port:ffff8802764001a8 port->console:0
[   15.293195] MIKE port:ffff8802764001a8 port->console:1
[   15.322806] serial8250: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
(30 more calls, all 0 pre 0 post)

That's with the below from Jiri Slaby applied to quell the reboot time
explosion.

---
 drivers/tty/serial/serial_core.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -106,12 +106,17 @@ static inline struct uart_port *uart_por
 void uart_write_wakeup(struct uart_port *port)
 {
 	struct uart_state *state = port->state;
+	struct tty_struct *ttyp;
+
 	/*
 	 * This means you called this function _after_ the port was
 	 * closed.  No cookie for you.
 	 */
 	BUG_ON(!state);
-	tty_wakeup(state->port.tty);
+	ttyp = tty_port_tty_get(&state->port);
+	if (ttyp)
+		tty_wakeup(ttyp);
+	tty_kref_put(ttyp);
 }
 
 static void uart_stop(struct tty_struct *tty)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ