ixgbevf: Add lock around ixgbevf_reinit_locked call
authorDon Skidmore <donald.c.skidmore@intel.com>
Tue, 12 Jul 2016 01:29:56 +0000 (21:29 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 22 Jul 2016 08:35:06 +0000 (01:35 -0700)
The function ixgbevf_reinit_locked() assumes you have the rtnl lock
however we didn't when calling from the service task.  This patch
corrects that.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c

index 1bffac37b29f76c31bcc60b74dee8b92ed48eac9..7dc42453fa0c2c8e3f412c94e271b6237fed86fe 100644 (file)
@@ -2779,7 +2779,9 @@ static void ixgbevf_reset_subtask(struct ixgbevf_adapter *adapter)
 
        adapter->tx_timeout_count++;
 
+       rtnl_lock();
        ixgbevf_reinit_locked(adapter);
+       rtnl_unlock();
 }
 
 /**