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]
Message-ID: <20200704115910.GY3703480@smile.fi.intel.com>
Date:   Sat, 4 Jul 2020 14:59:10 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc:     Tony Lindgren <tony@...mide.com>, Petr Mladek <pmladek@...e.com>,
        Raul Rangel <rrangel@...gle.com>,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        kurt@...utronix.de, "S, Shirish" <Shirish.S@....com>,
        Peter Zijlstra <peterz@...radead.org>,
        John Ogness <john.ogness@...utronix.de>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: Re: UART/TTY console deadlock

On Sat, Jul 04, 2020 at 02:35:46PM +0300, Andy Shevchenko wrote:
> On Fri, Jul 3, 2020 at 1:32 PM Sergey Senozhatsky
> <sergey.senozhatsky@...il.com> wrote:
> > On (20/07/02 09:05), Tony Lindgren wrote:
> > > * Sergey Senozhatsky <sergey.senozhatsky@...il.com> [200702 05:13]:
> > > > On (20/06/30 11:02), Tony Lindgren wrote:

...

> > This is, basically, an equivalent of
> >
> > ---
> >  drivers/tty/serial/8250/8250_port.c | 5 +----
> >  1 file changed, 1 insertion(+), 4 deletions(-)
> >
> > diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
> > index d64ca77d9cfa..dba7747d2ddd 100644
> > --- a/drivers/tty/serial/8250/8250_port.c
> > +++ b/drivers/tty/serial/8250/8250_port.c
> > @@ -2275,6 +2275,7 @@ int serial8250_do_startup(struct uart_port *port)
> >
> >         if (port->irq && !(up->port.flags & UPF_NO_THRE_TEST)) {
> >                 unsigned char iir1;
> > +
> >                 /*
> >                  * Test for UARTs that do not reassert THRE when the
> >                  * transmitter is idle and the interrupt has already
> > @@ -2284,8 +2285,6 @@ int serial8250_do_startup(struct uart_port *port)
> >                  * allow register changes to become visible.
> >                  */
> >                 spin_lock_irqsave(&port->lock, flags);
> > -               if (up->port.irqflags & IRQF_SHARED)
> > -                       disable_irq_nosync(port->irq);
> >
> >                 wait_for_xmitr(up, UART_LSR_THRE);
> >                 serial_port_out_sync(port, UART_IER, UART_IER_THRI);
> > @@ -2297,8 +2296,6 @@ int serial8250_do_startup(struct uart_port *port)
> >                 iir = serial_port_in(port, UART_IIR);
> >                 serial_port_out(port, UART_IER, 0);
> >
> > -               if (port->irqflags & IRQF_SHARED)
> > -                       enable_irq(port->irq);
> >                 spin_unlock_irqrestore(&port->lock, flags);
> >
> >                 /*
> 
> ...which effectively is a revert of
> 
> 768aec0b5bcc ("serial: 8250: fix shared interrupts issues with SMP and
> RT kernels")

(without c389d27b5e64 ("8250.c: port.lock is irq-safe") applied)

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ