Linux-Next discussions
 help / color / mirror / Atom feed
* Coverity: imx_mu_scu_rx(): Memory - corruptions
@ 2020-04-13 16:21 coverity-bot
  2020-04-14  3:16 ` Peng Fan
  0 siblings, 1 reply; 2+ messages in thread
From: coverity-bot @ 2020-04-13 16:21 UTC (permalink / raw)
  To: Peng Fan; +Cc: Oleksij Rempel, Jassi Brar, Gustavo A. R. Silva, linux-next

Hello!

This is an experimental automated report about issues detected by Coverity
from a scan of next-20200413 as part of the linux-next weekly scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:

  Thu Mar 19 15:49:52 2020 +0800
    0a67003b1985 ("mailbox: imx: add SCU MU support")

Coverity reported the following:

*** CID 1461658:  Memory - corruptions  (OVERRUN)
/drivers/mailbox/imx-mailbox.c: 214 in imx_mu_scu_rx()
208     		ret = readl_poll_timeout(priv->base + priv->dcfg->xSR, xsr,
209     					 xsr & IMX_MU_xSR_RFn(i % 4), 0, 100);
210     		if (ret) {
211     			dev_err(priv->dev, "timeout read idx %d\n", i);
212     			return ret;
213     		}
vvv     CID 1461658:  Memory - corruptions  (OVERRUN)
vvv     Overrunning array of 8 4-byte elements at element index 31 (byte offset 127) by dereferencing pointer "data++".
214     		*data++ = imx_mu_read(priv, priv->dcfg->xRR[i % 4]);
215     	}
216
217     	imx_mu_xcr_rmw(priv, IMX_MU_xCR_RIEn(0), 0);
218     	mbox_chan_received_data(cp->chan, (void *)&msg);
219

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1461658 ("Memory - corruptions")
Fixes: 0a67003b1985 ("mailbox: imx: add SCU MU support")

Thanks for your attention!

-- 
Coverity-bot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-14  3:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-13 16:21 Coverity: imx_mu_scu_rx(): Memory - corruptions coverity-bot
2020-04-14  3:16 ` Peng Fan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox