]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ixgbe: prevent speculative processing of descriptors before ready
authorMilton Miller <miltonm@bga.com>
Fri, 19 Feb 2010 17:44:42 +0000 (17:44 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:45:07 +0000 (12:45 -0700)
commitecd28df16abedcd61fbd94921a514c13948c2390
treed8889542671ca153ef83f0c6d25092b36c5ca474
parentb584b3505db0b94c231014a6d3aa3c5a72298660
ixgbe: prevent speculative processing of descriptors before ready

commit 3c945e5b3719bcc18c6ddd31bbcae8ef94f3d19a upstream.

The PowerPC architecture does not require loads to independent bytes to be
ordered without adding an explicit barrier.

In ixgbe_clean_rx_irq we load the status bit then load the packet data.
With packet split disabled if these loads go out of order we get a
stale packet, but we will notice the bad sequence numbers and drop it.

The problem occurs with packet split enabled where the TCP/IP header and data
are in different descriptors. If the reads go out of order we may have data
that doesn't match the TCP/IP header. Since we use hardware checksumming this
bad data is never verified and it makes it all the way to the application.

This bug was found during stress testing and adding this barrier has been shown
to fix it.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: maximilian attems <max@stro.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/ixgbe/ixgbe_main.c