Files
linux/drivers
Vincenzo Maffione e029b8379e 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:25:58 +01:00
..
2018-07-22 14:27:36 +02:00
2018-11-13 11:16:56 -08:00
2018-02-25 11:05:55 +01:00
2018-08-22 07:47:14 +02:00
2017-09-09 17:39:41 +02:00
2018-08-24 13:12:32 +02:00
2018-11-10 07:43:00 -08:00
2018-11-13 11:17:04 -08:00
2018-11-13 11:17:02 -08:00
2018-10-03 17:01:42 -07:00
2018-11-10 07:42:58 -08:00