All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eran Ben Elisha <eranbe@mellanox.com>
To: netdev@vger.kernel.org, Jiri Pirko <jiri@mellanox.com>,
	"David S. Miller" <davem@davemloft.net>,
	Saeed Mahameed <saeedm@mellanox.com>
Cc: Moshe Shemesh <moshe@mellanox.com>,
	Eran Ben Elisha <eranbe@mellanox.com>
Subject: [PATCH net-next 7/7] net/mlx5e: Add RTNL lock to TX recover flow
Date: Tue, 22 Jan 2019 17:57:24 +0200	[thread overview]
Message-ID: <1548172644-30862-8-git-send-email-eranbe@mellanox.com> (raw)
In-Reply-To: <1548172644-30862-1-git-send-email-eranbe@mellanox.com>

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@mellanox.com>
Reported-by: Maria Pasechnik <mariap@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@mellanox.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


  parent reply	other threads:[~2019-01-22 15:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22 15:57 [PATCH net-next 0/7] Devlink health updates Eran Ben Elisha
2019-01-22 15:57 ` [PATCH net-next 1/7] devlink: Add devlink msg API Eran Ben Elisha
2019-01-23 14:31   ` Jiri Pirko
2019-01-24  7:31     ` Eran Ben Elisha
2019-01-22 15:57 ` [PATCH net-next 2/7] net/mlx5e: Move driver to use " Eran Ben Elisha
2019-01-23 14:39   ` Jiri Pirko
2019-01-24  7:39     ` Eran Ben Elisha
2019-01-24  9:08       ` Jiri Pirko
2019-01-24  9:57         ` Eran Ben Elisha
2019-01-22 15:57 ` [PATCH net-next 3/7] devlink: move devlink health reporter " Eran Ben Elisha
2019-01-23 14:42   ` Jiri Pirko
2019-01-24  7:45     ` Eran Ben Elisha
2019-01-24  9:09       ` Jiri Pirko
2019-01-24  9:57         ` Eran Ben Elisha
2019-01-22 15:57 ` [PATCH net-next 4/7] devlink: Delete depracated health buffers API Eran Ben Elisha
2019-01-22 15:57 ` [PATCH net-next 5/7] devlink: Remove spaces around "=" in the logger print Eran Ben Elisha
2019-01-22 15:57 ` [PATCH net-next 6/7] devlink: Fix use-after-free at reporter destroy Eran Ben Elisha
2019-01-22 15:57 ` Eran Ben Elisha [this message]
2019-01-22 16:58 ` [PATCH net-next 0/7] Devlink health updates Jiri Pirko
2019-01-25  6:08   ` David Miller
2019-01-25  9:16     ` Eran Ben Elisha
2019-01-25  9:19       ` Jiri Pirko
2019-01-25 18:56       ` David Miller
2019-01-23 11:44 ` Jiri Pirko
2019-01-23 12:34   ` Eran Ben Elisha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1548172644-30862-8-git-send-email-eranbe@mellanox.com \
    --to=eranbe@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=jiri@mellanox.com \
    --cc=moshe@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.