Netdev List
 help / color / mirror / Atom feed
From: Florian Fainelli <florian.fainelli@broadcom.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>, netdev@vger.kernel.org
Cc: Florian Fainelli <florian.fainelli@broadcom.com>,
	Jonas Gorski <jonas.gorski@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: dsa: b53: fix error propagation from b53_fdb_dump()
Date: Wed, 12 Aug 2026 13:24:15 -0700	[thread overview]
Message-ID: <bab70c3e-eea7-4a3a-9f7f-da90d0ae5fc3@broadcom.com> (raw)
In-Reply-To: <20260812201121.2012356-1-vladimir.oltean@nxp.com>

On 8/12/26 13:11, Vladimir Oltean wrote:
> The blamed commit replaced "return ret" statements in b53_fdb_dump()
> with "break;" which jumps to the mutex_unlock() -> return 0 section.
> 
> This is notably problematic because it swallows errors from the
> b53_fdb_copy() -> cb() path, and this will result in FDB dump truncation
> when the netlink skb overflows - see commit 21b52fed928e ("net: dsa:
> sja1105: fix broken backpressure in .port_fdb_dump").
> 
> Let's go back to "return ret". We don't need to preinitialize "ret" with
> 0, because the "do {} while" block guarantees we cannot reach the end of
> the function without at least once calling b53_arl_search_wait(), which
> will have initialized ret to some valid value.
> 
> Fixes: f7eb4a1c0864 ("net: dsa: b53: serialize access to the ARL table")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian


      reply	other threads:[~2026-08-12 20:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 20:11 [PATCH net] net: dsa: b53: fix error propagation from b53_fdb_dump() Vladimir Oltean
2026-08-12 20:24 ` Florian Fainelli [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=bab70c3e-eea7-4a3a-9f7f-da90d0ae5fc3@broadcom.com \
    --to=florian.fainelli@broadcom.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jonas.gorski@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vladimir.oltean@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