37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
|
|
From f72271e2a0ae4277d53c4053f5eed8bb346ba38a Mon Sep 17 00:00:00 2001
|
||
|
|
From: Brian King <brking@linux.vnet.ibm.com>
|
||
|
|
Date: Fri, 17 Nov 2017 11:05:49 -0600
|
||
|
|
Subject: i40evf: Use smp_rmb rather than read_barrier_depends
|
||
|
|
|
||
|
|
The original issue being fixed in this patch was seen with the ixgbe
|
||
|
|
driver, but the same issue exists with i40evf as well, as the code is
|
||
|
|
very similar. read_barrier_depends is not sufficient to ensure
|
||
|
|
loads following it are not speculatively loaded out of order
|
||
|
|
by the CPU, which can result in stale data being loaded, causing
|
||
|
|
potential system crashes.
|
||
|
|
|
||
|
|
Cc: stable <stable@vger.kernel.org>
|
||
|
|
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
|
||
|
|
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
|
||
|
|
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
|
||
|
|
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|
||
|
|
---
|
||
|
|
drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 +-
|
||
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/src/iavf_txrx.c b/src/iavf_txrx.c
|
||
|
|
index fe817e2b6fef4..50864f99446d3 100644
|
||
|
|
--- a/src/iavf_txrx.c
|
||
|
|
+++ b/src/iavf_txrx.c
|
||
|
|
@@ -289,7 +289,7 @@
|
||
|
|
break;
|
||
|
|
|
||
|
|
/* prevent any other reads prior to eop_desc */
|
||
|
|
- read_barrier_depends();
|
||
|
|
+ smp_rmb();
|
||
|
|
|
||
|
|
iavf_trace(clean_tx_irq, tx_ring, tx_desc, tx_buf);
|
||
|
|
/* if the descriptor isn't done, no work yet to do */
|
||
|
|
--
|
||
|
|
cgit 1.2.3-1.el7
|