]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnxt_en: Need memory barrier when processing the completion ring.
authorMichael Chan <michael.chan@broadcom.com>
Wed, 4 May 2016 20:56:43 +0000 (16:56 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 00:37:09 +0000 (17:37 -0700)
commit57f7a34780103bb57611eac523e9242badcc17f4
tree4675a2818afb3b5a96dc5f80f4676ea5dd9a7674
parentd6be11de2729012126ed35311b0755e27c4fe7e2
bnxt_en: Need memory barrier when processing the completion ring.

Orabug: 23221795

The code determines if the next ring entry is valid before proceeding
further to read the rest of the entry.  The CPU can re-order and read
the rest of the entry first, possibly reading a stale entry, if DMA
of a new entry happens right after reading it.  This issue can be
readily seen on a ppc64 system, causing it to crash.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 67a95e2022c7f0405408fb1f910283785ece354a)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c