linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: "Vabhav Sharma (OSS)" <vabhav.sharma@oss.nxp.com>
Cc: "bhuvanchandra.dv@toradex.com" <bhuvanchandra.dv@toradex.com>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Subject: Re: tty: serial: lpuart driver (drivers/tty/serial/fsl_lpuart.c): commit 5887ad43ee02a00f1
Date: Fri, 17 Jul 2020 09:32:04 +0200	[thread overview]
Message-ID: <20200717073204.GA694429@kroah.com> (raw)
In-Reply-To: <VI1PR04MB4800E14DE8DC62AEB23C89ECF37C0@VI1PR04MB4800.eurprd04.prod.outlook.com>

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

           reply	other threads:[~2020-07-17  7:32 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <VI1PR04MB4800E14DE8DC62AEB23C89ECF37C0@VI1PR04MB4800.eurprd04.prod.outlook.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200717073204.GA694429@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bhuvanchandra.dv@toradex.com \
    --cc=linux-serial@vger.kernel.org \
    --cc=vabhav.sharma@oss.nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).