diff options
| author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2026-08-12 23:11:21 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-08-17 13:48:16 -0700 |
| commit | 4f1d06cf8aaa9d2cb18e5ee8835aff6177256bc6 (patch) | |
| tree | e71d704b21002dbd59f83bab4893bb7ff5844e02 | |
| parent | b0346dd64e4905291cc9c479f2e6cf1884ced4e6 (diff) | |
| download | linux-4f1d06cf8aaa9d2cb18e5ee8835aff6177256bc6.tar.gz linux-4f1d06cf8aaa9d2cb18e5ee8835aff6177256bc6.zip | |
net: dsa: b53: fix error propagation from b53_fdb_dump()
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>
Link: https://patch.msgid.link/20260812201121.2012356-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| -rw-r--r-- | drivers/net/dsa/b53/b53_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index 3f5b9592794d..0880310c9ce3 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -2219,7 +2219,7 @@ int b53_fdb_dump(struct dsa_switch *ds, int port, mutex_unlock(&priv->arl_mutex); - return 0; + return ret; } EXPORT_SYMBOL(b53_fdb_dump); |
