]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.4.103/igbvf-use-smp_rmb-rather-than-read_barrier_depends.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.4.103 / igbvf-use-smp_rmb-rather-than-read_barrier_depends.patch
1 From 1e1f9ca546556e508d021545861f6b5fc75a95fe Mon Sep 17 00:00:00 2001
2 From: Brian King <brking@linux.vnet.ibm.com>
3 Date: Fri, 17 Nov 2017 11:05:46 -0600
4 Subject: igbvf: Use smp_rmb rather than read_barrier_depends
5
6 From: Brian King <brking@linux.vnet.ibm.com>
7
8 commit 1e1f9ca546556e508d021545861f6b5fc75a95fe upstream.
9
10 The original issue being fixed in this patch was seen with the ixgbe
11 driver, but the same issue exists with igbvf as well, as the code is
12 very similar. read_barrier_depends is not sufficient to ensure
13 loads following it are not speculatively loaded out of order
14 by the CPU, which can result in stale data being loaded, causing
15 potential system crashes.
16
17 Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
18 Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
19 Tested-by: Aaron Brown <aaron.f.brown@intel.com>
20 Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23 ---
24 drivers/net/ethernet/intel/igbvf/netdev.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27 --- a/drivers/net/ethernet/intel/igbvf/netdev.c
28 +++ b/drivers/net/ethernet/intel/igbvf/netdev.c
29 @@ -809,7 +809,7 @@ static bool igbvf_clean_tx_irq(struct ig
30 break;
31
32 /* prevent any other reads prior to eop_desc */
33 - read_barrier_depends();
34 + smp_rmb();
35
36 /* if DD is not set pending work has not been completed */
37 if (!(eop_desc->wb.status & cpu_to_le32(E1000_TXD_STAT_DD)))