From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Jisheng Zhang <jszhang@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Russell King <rmk+kernel@armlinux.org.uk>
Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] net: stmmac: fix uninitialized axi_blen array
Date: Tue, 24 Nov 2026 17:23:03 +0100 [thread overview]
Message-ID: <1498b3ff-c43a-4087-a108-016fda1a5b03@bootlin.com> (raw)
In-Reply-To: <20261124150144.7505-1-jszhang@kernel.org>
On 11/24/26 16:01, Jisheng Zhang wrote:
> If platform doesn't provide "snps,blen" property, the axi_blen[] array
> will contain random value from stack, then the array will be converted
> to mask which will be written to DMA_AXI_BUS_MODE reg later. Fix it by
> initializing the array.
>
> Fixes: efd3c8cc52bb ("net: stmmac: remove axi_blen array")
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
I let you answer the bot on how that was found, etc. (it's better
to put that in the commit log anyway)
Thanks,
Maxime
> ---
> since v1:
> - fix subject title
>
> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> index b3e06aa58fe5..29ead405f449 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -96,7 +96,7 @@ static struct stmmac_axi *stmmac_axi_setup(struct platform_device *pdev)
> {
> struct device_node *np;
> struct stmmac_axi *axi;
> - u32 axi_blen[AXI_BLEN];
> + u32 axi_blen[AXI_BLEN] = {};
>
> np = of_parse_phandle(pdev->dev.of_node, "snps,axi-config", 0);
> if (!np)
prev parent reply other threads:[~2026-11-24 16:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 15:01 [PATCH net v2] net: stmmac: fix uninitialized axi_blen array Jisheng Zhang
2026-11-24 15:28 ` netdev-bot+sinfo
2026-11-24 16:23 ` Maxime Chevallier [this message]
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=1498b3ff-c43a-4087-a108-016fda1a5b03@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jszhang@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
/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