From: Dan Carpenter <dan.carpenter@oracle.com>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>, Peng Fan <peng.fan@nxp.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Frieder Schrempf <frieder.schrempf@kontron.de>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] soc: imx: imx8m-blk-ctrl: off by one in imx8m_blk_ctrl_xlate()
Date: Tue, 12 Oct 2021 12:33:46 +0300 [thread overview]
Message-ID: <20211012093346.GR2083@kadam> (raw)
In-Reply-To: <c71c6680e0930fd84f10e4fa13bd59e1f30c2db6.camel@pengutronix.de>
On Tue, Oct 12, 2021 at 10:29:27AM +0200, Lucas Stach wrote:
> Hi Dan,
>
> Am Montag, dem 11.10.2021 um 15:36 +0300 schrieb Dan Carpenter:
> > The > comparison should be >= to prevent reading one element beyond the
> > end of the array. The onecell_data->domains[] array is allocated in
> > imx8m_blk_ctrl_probe() and it has "onecell_data->num_domains" elements.
>
> Thanks for the patch! I guess this was found via smatch? I should
> really make it a habit to use smatch on my submissions...
Yeah, but not a from a published check. I have a private check for
off by one errors that warns about any > vs >= comparisons that cannot
be proved as correct.
regards,
dan carpenter
next prev parent reply other threads:[~2021-10-12 10:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-11 12:36 [PATCH] soc: imx: imx8m-blk-ctrl: off by one in imx8m_blk_ctrl_xlate() Dan Carpenter
2021-10-12 8:29 ` Lucas Stach
2021-10-12 9:33 ` Dan Carpenter [this message]
2021-10-15 3:10 ` Shawn Guo
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=20211012093346.GR2083@kadam \
--to=dan.carpenter@oracle.com \
--cc=festevam@gmail.com \
--cc=frieder.schrempf@kontron.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=peng.fan@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/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