[SRU][Bionic][PATCH 1/1] UBUNTU: SAUCE: net/mlx5e: IPoIB, initialize update_stat_work for ipoib devices
Ian May
ian.may at canonical.com
Wed Nov 25 18:07:35 UTC 2020
From: Amir Tzin <amirtz at nvidia.com>
BugLink: https://launchpad.net/bugs/1904848
mlx5e_detach_netdev cancels update_stats_work which was not initialized
in ipoib netdevice profile, as a result, unloading the ib_ipoib module
causes a call trace in the kernel ring buffer.
current implementation inits update_stats_work in each netdev profile->init
call back and cancels it in mlx5e_detach_netdev, so lets follow this guideline
and init update_stat_work for ipoib netdev in it's profile->init callback.
Fixes: cd565b4b51e5 ("IB/IPoIB: Support acceleration options callbacks")
Signed-off-by: Amir Tzin <amirtz at nvidia.com>
Reviewed-by: Feras Daoud <ferasda at nvidia.com>
Signed-off-by: Ian May <ian.may at canonical.com>
---
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
index e97e57c64902..f9110c8beddf 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
@@ -83,6 +83,7 @@ void mlx5i_init(struct mlx5_core_dev *mdev,
priv->hard_mtu = MLX5_IB_GRH_BYTES + MLX5_IPOIB_HARD_LEN;
mutex_init(&priv->state_lock);
+ INIT_DELAYED_WORK(&priv->update_stats_work, mlx5e_update_stats_work);
mlx5e_build_nic_params(mdev, &priv->channels.params, profile->max_nch(mdev));
mlx5i_build_nic_params(mdev, &priv->channels.params);
--
2.25.1
More information about the kernel-team
mailing list