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:   Thu, 26 Jul 2018 01:01:43 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Chen Hu <hu1.chen@...el.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>,
        "open list:SERIAL DRIVERS" <linux-serial@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] serial: core: stop passing NULL in uart_resume_port

On Wed, Jul 25, 2018 at 1:04 PM, Chen Hu <hu1.chen@...el.com> wrote:
> We found the baud rate is changed after S3 on some Intel Broxton
> platforms. The baud rate should be restored during resume. However, some
> set_termios() callback such as dw8250_set_termios() for DesignWare 8250
> will skip setting if old termios is NULL. We address this issue via
> passing a dummy.

Why does it need to be "fixed" here then?

>
> Signed-off-by: Chen Hu <hu1.chen@...el.com>
> ---
>  drivers/tty/serial/serial_core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
> index f02965936f2e..8b815f1539e8 100644
> --- a/drivers/tty/serial/serial_core.c
> +++ b/drivers/tty/serial/serial_core.c
> @@ -2217,6 +2217,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport)
>         struct device *tty_dev;
>         struct uart_match match = {uport, drv};
>         struct ktermios termios;
> +       static struct ktermios dummy;
>
>         mutex_lock(&port->mutex);
>
> @@ -2277,7 +2278,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport)
>                         pm_runtime_put_autosuspend(uport->dev);
>                         if (ret == 0) {
>                                 if (tty)
> -                                       uart_change_speed(tty, state, NULL);
> +                                       uart_change_speed(tty, state, &dummy);
>                                 pm_runtime_get_sync(uport->dev);
>                                 spin_lock_irq(&uport->lock);
>                                 ops->set_mctrl(uport, uport->mctrl);
> --
> 2.13.0
>



-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ