linux_dsm_epyc7002/drivers/net/ethernet/intel
Benjamin Poirier e2710dbf0d e1000e: Fix link check race condition
Alex reported the following race condition:

/* link goes up... interrupt... schedule watchdog */
\ e1000_watchdog_task
	\ e1000e_has_link
		\ hw->mac.ops.check_for_link() === e1000e_check_for_copper_link
			\ e1000e_phy_has_link_generic(..., &link)
				link = true

					 /* link goes down... interrupt */
					 \ e1000_msix_other
						 hw->mac.get_link_status = true

			/* link is up */
			mac->get_link_status = false

		link_active = true
		/* link_active is true, wrongly, and stays so because
		 * get_link_status is false */

Avoid this problem by making sure that we don't set get_link_status = false
after having checked the link.

It seems this problem has been present since the introduction of e1000e.

Link: https://lkml.org/lkml/2018/1/29/338
Reported-by: Alexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-03-12 12:05:39 -07:00
..
e1000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-01-09 10:37:00 -05:00
e1000e e1000e: Fix link check race condition 2018-03-12 12:05:39 -07:00
fm10k fm10k: clarify action when updating the VLAN table 2018-01-24 14:23:27 -08:00
i40e i40e: Fix the number of queues available to be mapped for use 2018-02-07 21:53:32 -05:00
i40evf i40e/i40evf: Update DESC_NEEDED value to reflect larger value 2018-01-29 14:21:01 -05:00
igb igb: Clear TXSTMP when ptp_tx_work() is timeout 2018-01-24 12:27:48 -08:00
igbvf igbvf: Use smp_rmb rather than read_barrier_depends 2017-11-21 23:46:04 -08:00
ixgb ethernet/intel: Convert timers to use timer_setup() 2017-10-18 12:40:26 +01:00
ixgbe ixgbe: fix crash in build_skb Rx code path 2018-02-26 13:44:24 -05:00
ixgbevf ixgbevf: use ARRAY_SIZE for various array sizing calculations 2018-01-26 10:25:15 -08:00
e100.c net: e100: Replace PCI pool old API 2018-01-02 16:14:17 -06:00
Kconfig i40evf: Add support for Adaptive Virtual Function 2017-06-01 14:30:02 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00