On Fri, Jun 10, 2016 at 2:17 PM, Eric Dumazet <[email protected]> wrote: > On Mon, 2016-04-18 at 21:19 +0200, Hannes Frederic Sowa wrote: >> 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]> >> --- >> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c >> b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c >> index 2976df77bf14f5..b2f2cf40f06a87 100644 >> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c >> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c >> @@ -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); > > Although there might be a deadlock with a concurrent > cancel_work_sync(&adapter->service_task); from ixgbe_remove()
I don't think we are holding the rtnl_lock when that is called. The ixgbe_remove function is a PCI function. The ixgbe_close routine is the one called with the rtnl_lock held. - Alex
