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] [day] [month] [year] [list]
Message-ID: <AS8PR04MB840417D1AEB9A75D9B4149AB92519@AS8PR04MB8404.eurprd04.prod.outlook.com>
Date:   Tue, 11 Jan 2022 08:46:00 +0000
From:   Sherry Sun <sherry.sun@....com>
To:     Jiri Slaby <jirislaby@...nel.org>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC:     "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH V2] tty: serial: fsl_lpuart: count tty buffer overruns

Hi Jiri,

> > Added support for counting the tty buffer overruns in fsl_lpuart
> > driver like other uart drivers.
> >
> > Signed-off-by: Sherry Sun <sherry.sun@....com>
> >
> > ---
> > changes in V2
> > 1. Change the copied type to int to avoid implicit conversion, as the
> > tty_insert_flip_string return type is int.
> > ---
> >   drivers/tty/serial/fsl_lpuart.c | 20 +++++++++++++-------
> >   1 file changed, 13 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/tty/serial/fsl_lpuart.c
> > b/drivers/tty/serial/fsl_lpuart.c index ce3e26144689..82a1a2817750
> > 100644
> > --- a/drivers/tty/serial/fsl_lpuart.c
> > +++ b/drivers/tty/serial/fsl_lpuart.c
> ...
> > @@ -1116,7 +1118,7 @@ static void lpuart_copy_rx_to_tty(struct
> lpuart_port *sport)
> >   	struct dma_chan *chan = sport->dma_rx_chan;
> >   	struct circ_buf *ring = &sport->rx_ring;
> >   	unsigned long flags;
> > -	int count = 0;
> > +	int count = 0, copied = 0;
> 
> Why is it necessary to initialize copied?
> 
> Actually neither count needs to be initialized AFAICT. Care to fix that too (in a
> separate patch).
> 
You are right, actually here the initialization for copied is not necessary. I will remove it in V3.
For the initialization for count, I can send another patch to remove it.

Best regards
Sherry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ