linux/drivers/net/ethernet/intel
Vincenzo Maffione 9b574c3d21 e1000: fix race condition between e1000_down() and e1000_watchdog
[ Upstream commit 44c445c3d1 ]

This patch fixes a race condition that can result into the interface being
up and carrier on, but with transmits disabled in the hardware.
The bug may show up by repeatedly IFF_DOWN+IFF_UP the interface, which
allows e1000_watchdog() interleave with e1000_down().

    CPU x                           CPU y
    --------------------------------------------------------------------
    e1000_down():
        netif_carrier_off()
                                    e1000_watchdog():
                                        if (carrier == off) {
                                            netif_carrier_on();
                                            enable_hw_transmit();
                                        }
        disable_hw_transmit();
                                    e1000_watchdog():
                                        /* carrier on, do nothing */

Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-11-21 09:27:41 +01:00
..
e1000 e1000: fix race condition between e1000_down() and e1000_watchdog 2018-11-21 09:27:41 +01:00
e1000e e1000e: allocate ring descriptors with dma_zalloc_coherent 2018-05-30 07:49:03 +02:00
fm10k fm10k: correctly check if interface is removed 2018-03-22 09:23:24 +01:00
i40e i40e: fix ethtool to get EEPROM data from X722 interface 2018-03-22 09:23:20 +01:00
i40evf i40evf: Use smp_rmb rather than read_barrier_depends 2017-11-30 08:37:24 +00:00
igb igb: Remove superfluous reset to PHY and page 0 selection 2018-11-10 07:41:40 -08:00
igbvf igbvf: Use smp_rmb rather than read_barrier_depends 2017-11-30 08:37:24 +00:00
ixgb drivers/net: get rid of unnecessary initializations in .get_drvinfo() 2015-10-16 00:24:10 -07:00
ixgbe ixgbe: Correct X550EM_x revision check 2018-11-10 07:41:38 -08:00
ixgbevf ixgbevf: Fix handling of NAPI budget when multiple queues are enabled per vector 2018-11-10 07:41:38 -08:00
e100.c e100: Release skb when DMA mapping is failed in e100_xmit_prepare 2015-08-18 14:06:05 -07:00
Kconfig drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
Makefile fm10k: Add skeletal frame for Intel(R) FM10000 Ethernet Switch Host Interface Driver 2014-09-23 03:59:13 -07:00