ixgbe: protect vxlan_get_rx_port in ixgbe_service_task with rtnl_lock
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Mon, 18 Apr 2016 19:19:45 +0000 (21:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Apr 2016 19:35:43 +0000 (15:35 -0400)
vxlan_get_rx_port 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/ixgbe/ixgbe_main.c

index 2976df77bf14f58f7e849324d34360ccdf1dfbd5..b2f2cf40f06a873adbc83f15147ce113b113e651 100644 (file)
@@ -7192,10 +7192,12 @@ static void ixgbe_service_task(struct work_struct *work)
                return;
        }
 #ifdef CONFIG_IXGBE_VXLAN
+       rtnl_lock();
        if (adapter->flags2 & IXGBE_FLAG2_VXLAN_REREG_NEEDED) {
                adapter->flags2 &= ~IXGBE_FLAG2_VXLAN_REREG_NEEDED;
                vxlan_get_rx_port(adapter->netdev);
        }
+       rtnl_unlock();
 #endif /* CONFIG_IXGBE_VXLAN */
        ixgbe_reset_subtask(adapter);
        ixgbe_phy_interrupt_subtask(adapter);