From: John Fastabend Date: Thu, 16 Jan 2014 10:30:05 +0000 (-0800) Subject: ixgbe: reinit_locked() should be called with rtnl_lock X-Git-Tag: firefly_0821_release~176^2~4570^2~143^2~5 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=8f4c5c9fb87aa113f33ddeb4028fb0de8e18311d;p=firefly-linux-kernel-4.4.55.git ixgbe: reinit_locked() should be called with rtnl_lock 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 Tested-by: Phil Schmitt Signed-off-by: Aaron Brown Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 3ca59d21d0b2..b445ad121de1 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(); } /**