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: <2023082205-jazz-evade-7f1a@gregkh>
Date:   Tue, 22 Aug 2023 15:27:35 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Wenhua Lin <Wenhua.Lin@...soc.com>
Cc:     Orson Zhai <orsonzhai@...il.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        Chunyan Zhang <zhang.lyra@...il.com>,
        linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
        wenhua lin <wenhua.lin1994@...il.com>,
        Xiongpeng Wu <xiongpeng.wu@...soc.com>,
        Zhirong Qiu <zhirong.qiu@...soc.com>,
        Zhaochen Su <Zhaochen.Su@...soc.com>
Subject: Re: [PATCH] tty/serial: Cancel work queue before closing uart

On Fri, Aug 18, 2023 at 11:15:32AM +0800, Wenhua Lin wrote:
> When the system constantly sleeps and wankes up, plugging and unplugging
> the USB will probalility trigger a kernel crash problem. The reason is
> that at this time, the system entered deep and turned off uart, and the
> abnormal behavior of plugging and upplugging the USB triggered the read
> data process of uart, causing access to uart to hang. The final solution
> we came up with is to cancel the work queue before shutting down uart
> , while ensuring that there is no uart business.
> 
> Signed-off-by: Wenhua Lin <Wenhua.Lin@...soc.com>
> ---
>  drivers/tty/serial/sprd_serial.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c
> index b58f51296ace..eddff4360155 100644
> --- a/drivers/tty/serial/sprd_serial.c
> +++ b/drivers/tty/serial/sprd_serial.c
> @@ -20,6 +20,7 @@
>  #include <linux/slab.h>
>  #include <linux/tty.h>
>  #include <linux/tty_flip.h>
> +#include "../tty.h"
>  
>  /* device name */
>  #define UART_NR_MAX		8
> @@ -1221,7 +1222,10 @@ static int sprd_probe(struct platform_device *pdev)
>  static int sprd_suspend(struct device *dev)
>  {
>  	struct sprd_uart_port *sup = dev_get_drvdata(dev);
> +	struct uart_port *uport = &sup->port;
> +	struct tty_port *tty = &uport->state->port;
>  
> +	tty_buffer_cancel_work(tty);

What does this serial port have to do with the USB subsystem in your
changelog text?

And as the kernel bot said, this breaks the build, you can't do this
within a serial driver, sorry.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ