Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Ziheng Wei
Tue, 01 Dec 2026 14:05
[PATCH net-next v2] mlxsw: spectrum_switchdev: fix wrong list member in flood rollback
Author: Ziheng Wei
Date: Tue, 01 Dec 2026 14:05
Date: Tue, 01 Dec 2026 14:05
38 lines
9764 bytes
9764 bytes
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.
Signed-off-by: Ziheng Wei <zihengw03@163.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
---
v1 -> v2:
- Retarget from net to net-next, drop non-regression Fixes tag, and add
Petr Machata's Reviewed-by.
- v1: https://lore.kernel.org/r/20261130103229.1383713-1-zihengw03@163.com
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index de60b698bea9..e54a4ec75ff1 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -787,7 +787,7 @@ mlxsw_sp_bridge_vlans_flood_set(struct mlxsw_sp_bridge_vlan *bridge_vlan,
err_fid_flood_set:
list_for_each_entry_continue_reverse(mlxsw_sp_port_vlan,
&bridge_vlan->port_vlan_list,
- list) {
+ bridge_vlan_node) {
u16 local_port = mlxsw_sp_port_vlan->mlxsw_sp_port->local_port;
mlxsw_sp_fid_flood_set(mlxsw_sp_port_vlan->fid, packet_type,
base-commit: 34d30f9e1f2d8cb25c12ae48572143411a6d278b
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads