mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
net/mlx5e: Fix error path of device attach
[ Upstream commit5cd39b6e9a] On failure to attach the netdev, fix the rollback by re-setting the device's state back to MLX5E_STATE_DESTROYING. Failing to attach doesn't stop statistics polling via .ndo_get_stats64. In this case, although the device is not attached, it falsely continues to query the firmware for counters. Setting the device's state back to MLX5E_STATE_DESTROYING prevents the firmware counters query. Fixes:26e59d8077("net/mlx5e: Implement mlx5e interface attach/detach callbacks") Signed-off-by: Aya Levin <ayal@mellanox.com> Reviewed-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
00bedd730d
commit
8901896f69
@@ -5356,6 +5356,8 @@ err_cleanup_tx:
|
||||
profile->cleanup_tx(priv);
|
||||
|
||||
out:
|
||||
set_bit(MLX5E_STATE_DESTROYING, &priv->state);
|
||||
cancel_work_sync(&priv->update_stats_work);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user