Re: [PATCH] e1000: fix race condition between e1000_down() and e1000_watchdog

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 09, 2018 at 02:12:33PM +0100, Loic wrote:
Hello,

Please picked up this patch for linux 4.4 and 4.9.
Compiled/tested without problem.

Thank.

[ Upstream commit 44c445c3d1b4eacff23141fa7977c3b2ec3a45c9 ]

From: Vincenzo Maffione <v.maffione@xxxxxxxxx>
Date: Sat, 16 Sep 2017 18:00:00 +0200
Subject: [PATCH] e1000: fix race condition between e1000_down() and
e1000_watchdog

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@xxxxxxxxx>
Tested-by: Aaron Brown <aaron.f.brown@xxxxxxxxx>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@xxxxxxxxx>

Queued for 4.9 and 4.4, thank you.

--
Thanks,
Sasha



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux