[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1548172644-30862-8-git-send-email-eranbe@mellanox.com>
Date: Tue, 22 Jan 2019 17:57:24 +0200
From: Eran Ben Elisha <eranbe@...lanox.com>
To: netdev@...r.kernel.org, Jiri Pirko <jiri@...lanox.com>,
"David S. Miller" <davem@...emloft.net>,
Saeed Mahameed <saeedm@...lanox.com>
Cc: Moshe Shemesh <moshe@...lanox.com>,
Eran Ben Elisha <eranbe@...lanox.com>
Subject: [PATCH net-next 7/7] net/mlx5e: Add RTNL lock to TX recover flow
As part of the recover flow, driver calls mlx5e_open_locked, which
eventually calls netif_set_real_num_tx_queues. RTNL lock must be held as
part of this flow in advance, like in other flows in the driver.
Fixes: aba25279c100 ("net/mlx5e: Add TX reporter support")
Signed-off-by: Eran Ben Elisha <eranbe@...lanox.com>
Reported-by: Maria Pasechnik <mariap@...lanox.com>
Reviewed-by: Moshe Shemesh <moshe@...lanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
index 7238cda670ba..5c29de7bd1d6 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
@@ -173,10 +173,12 @@ static int mlx5e_tx_reporter_recover_all(struct mlx5e_priv *priv)
{
int err;
+ rtnl_lock();
mutex_lock(&priv->state_lock);
mlx5e_close_locked(priv->netdev);
err = mlx5e_open_locked(priv->netdev);
mutex_unlock(&priv->state_lock);
+ rtnl_unlock();
return err;
}
--
2.17.1
Powered by blists - more mailing lists