netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaron Brown <aaron.f.brown@intel.com>
To: davem@davemloft.net
Cc: John Fastabend <john.r.fastabend@intel.com>,
	netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
	Aaron Brown <aaron.f.brown@intel.com>
Subject: [net-next 1/6] ixgbe: reinit_locked() should be called with rtnl_lock
Date: Thu, 16 Jan 2014 02:30:05 -0800	[thread overview]
Message-ID: <1389868210-24035-2-git-send-email-aaron.f.brown@intel.com> (raw)
In-Reply-To: <1389868210-24035-1-git-send-email-aaron.f.brown@intel.com>

From: John Fastabend <john.r.fastabend@intel.com>

ixgbe_service_task() is calling ixgbe_reinit_locked() without
the rtnl_lock being held. This is because it is being called
from a worker thread and not a rtnl netlink or dcbnl path.

Add rtnl_{un}lock() semantics. I found this during code review.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 3ca59d2..b445ad1 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -6392,7 +6392,9 @@ static void ixgbe_reset_subtask(struct ixgbe_adapter *adapter)
 	netdev_err(adapter->netdev, "Reset adapter\n");
 	adapter->tx_timeout_count++;
 
+	rtnl_lock();
 	ixgbe_reinit_locked(adapter);
+	rtnl_unlock();
 }
 
 /**
-- 
1.8.5.GIT

  reply	other threads:[~2014-01-16 10:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-16 10:30 [net-next 0/6] Intel Wired LAN Driver Updates Aaron Brown
2014-01-16 10:30 ` Aaron Brown [this message]
2014-01-16 10:30 ` [net-next 2/6] ixgbevf: set the disable state when ixgbevf_qv_disable is called Aaron Brown
2014-01-16 10:30 ` [net-next 3/6] ixgbevf: use pci drvdata correctly in ixgbevf_suspend() Aaron Brown
2014-01-16 10:30 ` [net-next 4/6] ixgbevf: Convert ring storage form pointer to an array to array of pointers Aaron Brown
2014-01-16 10:30 ` [net-next 5/6] ixgbevf: create function for all of ring init Aaron Brown
2014-01-16 10:30 ` [net-next 6/6] ixgbe: Fix incorrect logic for fixed fiber eeprom write Aaron Brown
2014-01-16 23:35 ` [net-next 0/6] Intel Wired LAN Driver Updates David Miller

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=1389868210-24035-2-git-send-email-aaron.f.brown@intel.com \
    --to=aaron.f.brown@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=john.r.fastabend@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).