Re: [PATCH net] mlxsw: spectrum_switchdev: fix wrong list member in flood rollback

From: Petr Machata

Date: Mon Nov 30 2026 - 06:22:57 EST


Ziheng Wei <zihengw03@xxxxxxx> writes:

> mlxsw_sp_bridge_vlans_flood_set() inserts and walks entries on
> bridge_vlan->port_vlan_list via mlxsw_sp_port_vlan->bridge_vlan_node,
> but its err_fid_flood_set rollback path instead uses the list member in
> list_for_each_entry_continue_reverse().
>
> Use bridge_vlan_node so rollback computes the proper container address
> and walks the same list as the forward loop.
>
> Found by LLM-assisted static analysis. Compile-tested on x86_64 with
> CONFIG_MLXSW_SPECTRUM=m; no hardware test.
>
> Fixes: a6f43b1dad80 ("mlxsw: spectrum_switchdev: Simplify mlxsw_sp_port_mc_disabled_set()")
> Signed-off-by: Ziheng Wei <zihengw03@xxxxxxx>

Thanks for the patch! The issue is no regression though. The commit this
is patching (itself a fix of a previously-erroneous behavior) introduced
no regression. Previously, not even the forward loop was done, much less
the rollback. Therefore please resend for net-next.

Reviewed-by: Petr Machata <petrm@xxxxxxxxxx>

pw-bot: rejected