public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Daniel Golle <daniel@makrotopia.org>,
	Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Frank Wunderlich <frankwu@gmx.de>, Chad Monroe <chad@monroe.io>,
	Cezary Wilmanski <cezary.wilmanski@adtran.com>,
	Liang Xu <lxu@maxlinear.com>,
	"Benny (Ying-Tsan) Weng" <yweng@maxlinear.com>,
	Jose Maria Verdu Munoz <jverdu@maxlinear.com>,
	Avinash Jayaraman <ajayaraman@maxlinear.com>,
	John Crispin <john@phrozen.org>
Subject: Re: [PATCH net-next v5 2/2] net: dsa: mxl862xx: implement bridge offloading
Date: Thu, 19 Mar 2026 09:51:40 +0100	[thread overview]
Message-ID: <16a4ac6c-abde-4121-9032-7626640facbe@redhat.com> (raw)
In-Reply-To: <0cf66a043eff3585270785a35e821e9a44afd6b6.1773591297.git.daniel@makrotopia.org>

On 3/15/26 5:20 PM, Daniel Golle wrote:
> +static int mxl862xx_set_ageing_time(struct dsa_switch *ds, unsigned int msecs)
> +{
> +	struct mxl862xx_cfg param;
> +	int ret;
> +
> +	ret = MXL862XX_API_READ(ds->priv, MXL862XX_COMMON_CFGGET, param);

AI review says:

Is the param struct initialized here? Looking at MXL862XX_API_READ(), it
expands to mxl862xx_api_wrap() which writes the contents of the data buffer
to firmware MDIO registers before sending the GET command. This would send
uninitialized kernel stack data to the firmware hardware.

Every other MXL862XX_API_READ() call site in the driver uses a
zero-initialized struct. For example, in mxl862xx_setup():

	struct mxl862xx_cfg cfg = {};
	...
	ret = MXL862XX_API_READ(priv, MXL862XX_COMMON_CFGGET, cfg);

Should param be initialized with = {} here?


  reply	other threads:[~2026-03-19  8:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-15 16:20 [PATCH net-next v5 0/2] net: dsa: mxl862xx: add support for bridge offloading Daniel Golle
2026-03-15 16:20 ` [PATCH net-next v5 1/2] dsa: tag_mxl862xx: set dsa_default_offload_fwd_mark() Daniel Golle
2026-03-15 16:20 ` [PATCH net-next v5 2/2] net: dsa: mxl862xx: implement bridge offloading Daniel Golle
2026-03-19  8:51   ` Paolo Abeni [this message]
2026-03-19 11:56     ` Daniel Golle
2026-03-19  8:57   ` Paolo Abeni
2026-03-19 12:15     ` Daniel Golle

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=16a4ac6c-abde-4121-9032-7626640facbe@redhat.com \
    --to=pabeni@redhat.com \
    --cc=ajayaraman@maxlinear.com \
    --cc=andrew@lunn.ch \
    --cc=cezary.wilmanski@adtran.com \
    --cc=chad@monroe.io \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=frankwu@gmx.de \
    --cc=horms@kernel.org \
    --cc=john@phrozen.org \
    --cc=jverdu@maxlinear.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lxu@maxlinear.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=yweng@maxlinear.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