mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
Merge branch 'net-mlx5-lag-bug-fixes'
Tariq Toukan says: ==================== net/mlx5: LAG bug fixes Three bug fixes by Shay in the mlx5 LAG subsystem. Patch 1 fixes an off-by-one in the error rollback path of mlx5_lag_create_single_fdb_filter(): the loop started from the failed index i, potentially operating on uninitialized state or double-tearing-down an entry that had already self-rolled-back. The rollback should start from i - 1. Patch 2 fixes a hang in mlx5_mpesw_work(): when mlx5_lag_get_devcom_comp() returns NULL the function returned early without calling complete(), blocking any caller waiting on mpesww->comp indefinitely. Patch 3 fixes a kernel crash during teardown when mlx5_lag_get_dev_seq() returns an error because no device is marked as master or the peer is no longer in the LAG. The peer flow cleanup is now skipped instead of proceeding with a bad pointer. This series by Shay fixes three bugs in the mlx5 LAG subsystem. v1: https://lore.kernel.org/all/20260617063204.547427-2-tariqt@nvidia.com/ ==================== Link: https://patch.msgid.link/20260630112917.698313-1-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
commit
88c4273ab4
|
|
@ -5547,6 +5547,9 @@ void mlx5e_tc_clean_fdb_peer_flows(struct mlx5_eswitch *esw)
|
|||
|
||||
mlx5_devcom_for_each_peer_entry(devcom, peer_esw, pos) {
|
||||
i = mlx5_lag_get_dev_seq(peer_esw->dev);
|
||||
if (i < 0)
|
||||
continue;
|
||||
|
||||
list_for_each_entry_safe(flow, tmp, &esw->offloads.peer_flows[i], peer[i])
|
||||
mlx5e_tc_del_fdb_peers_flow(flow);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -194,8 +194,10 @@ static void mlx5_mpesw_work(struct work_struct *work)
|
|||
struct mlx5_lag *ldev = mpesww->lag;
|
||||
|
||||
devcom = mlx5_lag_get_devcom_comp(ldev);
|
||||
if (!devcom)
|
||||
return;
|
||||
if (!devcom) {
|
||||
mpesww->result = -ENODEV;
|
||||
goto complete;
|
||||
}
|
||||
|
||||
mlx5_devcom_comp_lock(devcom);
|
||||
mlx5_mpesw_sd_devcoms_lock(ldev);
|
||||
|
|
@ -213,6 +215,7 @@ static void mlx5_mpesw_work(struct work_struct *work)
|
|||
mutex_unlock(&ldev->lock);
|
||||
mlx5_mpesw_sd_devcoms_unlock(ldev);
|
||||
mlx5_devcom_comp_unlock(devcom);
|
||||
complete:
|
||||
complete(&mpesww->comp);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ static int mlx5_lag_create_single_fdb_filter(struct mlx5_lag *ldev, u32 filter)
|
|||
}
|
||||
return 0;
|
||||
err:
|
||||
mlx5_lag_for_each_reverse(j, i, 0, ldev, filter) {
|
||||
mlx5_lag_for_each_reverse(j, i - 1, 0, ldev, filter) {
|
||||
struct mlx5_eswitch *slave_esw;
|
||||
|
||||
if (j == master_idx)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user