From: Petr Machata <petrm@nvidia.com>
To: <netdev-bot+sashiko@kernel.org>
Cc: <zihengw03@163.com>, <idosch@nvidia.com>, <petrm@nvidia.com>,
<andrew+netdev@lunn.ch>, <davem@davemloft.net>,
<edumazet@kernel.org>, <kuba@kernel.org>, <pabeni@redhat.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v2] mlxsw: spectrum_switchdev: fix wrong list member in flood rollback
Date: Thu, 3 Dec 2026 16:07:41 +0100 [thread overview]
Message-ID: <87zeums8qq.fsf@pmachata.org> (raw)
In-Reply-To: <179630676913.3146.11195765689296855371@kernel.org> (netdev-bot's message of "Thu, 03 Dec 2026 14:06:09 +0000")
netdev-bot+sashiko@kernel.org writes:
> So the old loop walked the failing port's vlans_list. It called
> mlxsw_sp_fid_flood_set(..., !member) on the FIDs of unrelated VLANs on
> that port and rewrote their hardware flood membership.
> mlxsw_sp_fid_flood_set() then follows fid->fid_family and
> fid_family->flood_profile through that garbage pointer, which would likely
> oops. If it doesn't oops, the walk goes round the circular list forever.
>
> A bridge mcast_snooping toggle can reach this path:
>
> mlxsw_sp_port_attr_set()->mlxsw_sp_port_mc_disabled_set()->
> mlxsw_sp_bridge_ports_flood_table_set()->mlxsw_sp_bridge_vlans_flood_set()
>
> It triggers when mlxsw_sp_fid_flood_set() -> mlxsw_sp_pgt_entry_port_add()
> fails because an allocation or a register write fails.
> Documentation/process/submitting-patches.rst asks for the user-visible
> impact even when a problem was found by code review. Could the changelog
> mention the possible oops or endless loop? Otherwise the fix may look like
> a cosmetic error-path cleanup.
Thanks for digging up this info, which is henceforth available on the
list! Let's not respin for this though, please.
>> v1 -> v2:
>> - Retarget from net to net-next, drop non-regression Fixes tag, and add
>> Petr Machata's Reviewed-by.
>
> [Severity: Medium]
> Should this keep a Fixes: tag?
I don't thik so. This is allocating non-atomic memory, the failure
there, especially in context of a typical deployment of that code, is
not very likely. Register writes don't really fail either, at all. Let's
treat it as a nice cleanup that it is and not stir the pot with the
backports the Fixes tag would inevitably prompt.
prev parent reply other threads:[~2026-12-03 15:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 14:05 [PATCH net-next v2] mlxsw: spectrum_switchdev: fix wrong list member in flood rollback Ziheng Wei
2026-12-03 14:06 ` netdev-bot+sashiko
2026-12-03 14:40 ` Ziheng Wei
2026-12-03 15:07 ` Petr Machata [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=87zeums8qq.fsf@pmachata.org \
--to=petrm@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=zihengw03@163.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