* Re: tty: serial: lpuart driver (drivers/tty/serial/fsl_lpuart.c): commit 5887ad43ee02a00f1
[not found] <VI1PR04MB4800E14DE8DC62AEB23C89ECF37C0@VI1PR04MB4800.eurprd04.prod.outlook.com>
@ 2020-07-17 7:32 ` gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2020-07-17 7:32 UTC (permalink / raw)
To: Vabhav Sharma (OSS); +Cc: bhuvanchandra.dv, linux-serial
On Fri, Jul 17, 2020 at 07:01:03AM +0000, Vabhav Sharma (OSS) wrote:
> Hello Greg, Bhuvanchandra DV,
> Static analysis tool is run against upstream kernel tree and found medium priority coverity issue against changes: commit 5887ad43ee02a00f17a6132b7fb256dc6865474c
>
> Below are details
> sport->rx_dma_rng_buf_len = (1 << (fls(sport->rx_dma_rng_buf_len) - 1));
>
> Bad bit shift operation, The operation may have an undefined behavior or yield an unexpected result.
> A bit shift operation has a shift amount which is too large or has a negative value.
>
> zero_return: Function call fls(sport->rx_dma_rng_buf_len) returns 0
> CID 9000793 (#5 of 5):
> Bad bit shift operation (BAD_SHIFT)4. negative_shift: In expression 1 << fls(sport->rx_dma_rng_buf_len) - 1, shifting by a negative amount has undefined behavior. The shift amount, fls(sport->rx_dma_rng_buf_len) - 1, is -1.
>
> Would you like to push changes for fixing the coverity issue.
Can you submit a patch for this, no need to make someone else do it :)
And note, html email is rejected by the mailing lists.
thanks,
greg k-h
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-17 7:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <VI1PR04MB4800E14DE8DC62AEB23C89ECF37C0@VI1PR04MB4800.eurprd04.prod.outlook.com>
2020-07-17 7:32 ` tty: serial: lpuart driver (drivers/tty/serial/fsl_lpuart.c): commit 5887ad43ee02a00f1 gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).