Skip to content

Commit 2f7de4d

Browse files
bjking1gregkh
authored andcommitted
igbvf: Use smp_rmb rather than read_barrier_depends
commit 1e1f9ca546556e508d021545861f6b5fc75a95fe upstream. The original issue being fixed in this patch was seen with the ixgbe driver, but the same issue exists with igbvf 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. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 391cdaa commit 2f7de4d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/net/ethernet/intel/igbvf

drivers/net/ethernet/intel/igbvf/netdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ static bool igbvf_clean_tx_irq(struct igbvf_ring *tx_ring)
809809
break;
810810

811811
/* prevent any other reads prior to eop_desc */
812-
read_barrier_depends();
812+
smp_rmb();
813813

814814
/* if DD is not set pending work has not been completed */
815815
if (!(eop_desc->wb.status & cpu_to_le32(E1000_TXD_STAT_DD)))

0 commit comments

Comments
 (0)