fm10k: protect fm10k_open in fm10k_io_resume with rtnl_lock
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Mon, 18 Apr 2016 19:19:43 +0000 (21:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Apr 2016 19:35:43 +0000 (15:35 -0400)
fm10k_open requires rtnl_lock to be held.

Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: Shannon Nelson <shannon.nelson@intel.com>
Cc: Carolyn Wyborny <carolyn.wyborny@intel.com>
Cc: Don Skidmore <donald.c.skidmore@intel.com>
Cc: Bruce Allan <bruce.w.allan@intel.com>
Cc: John Ronciak <john.ronciak@intel.com>
Cc: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/fm10k/fm10k_pci.c

index 404f47a..206a466 100644 (file)
@@ -2287,8 +2287,10 @@ static void fm10k_io_resume(struct pci_dev *pdev)
        /* reassociate interrupts */
        fm10k_mbx_request_irq(interface);
 
+       rtnl_lock();
        if (netif_running(netdev))
                err = fm10k_open(netdev);
+       rtnl_unlock();
 
        /* final check of hardware state before registering the interface */
        err = err ? : fm10k_hw_ready(interface);