ixgbe: protect vxlan_get_rx_port in ixgbe_service_task with rtnl_lock
authorHannes Frederic Sowa <[email protected]>
Mon, 18 Apr 2016 19:19:45 +0000 (21:19 +0200)
committerDavid S. Miller <[email protected]>
Thu, 21 Apr 2016 19:35:43 +0000 (15:35 -0400)
vxlan_get_rx_port requires rtnl_lock to be held.

Cc: Jeff Kirsher <[email protected]>
Cc: Jesse Brandeburg <[email protected]>
Cc: Shannon Nelson <[email protected]>
Cc: Carolyn Wyborny <[email protected]>
Cc: Don Skidmore <[email protected]>
Cc: Bruce Allan <[email protected]>
Cc: John Ronciak <[email protected]>
Cc: Mitch Williams <[email protected]>
Signed-off-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
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);