aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/jme.c
diff options
context:
space:
mode:
authorGuo-Fu Tseng <cooldavid@cooldavid.org>2010-10-18 10:10:42 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-21 06:52:10 -0400
commitea192aa89c3b26d56113e70c72238f6951d4097f (patch)
treead9da86028bcbfcea07be56be4a3ab2df4470b01 /drivers/net/jme.c
parent3ee94018a9f49ca98e3f77f54a769c784115dbb8 (diff)
jme: Prevent possible read re-order error
Adding read memory barrier in between flag reading and data reading of receive descriptors. This prevents the data being read before hardware complete writing informations. Reported-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/jme.c')
-rw-r--r--drivers/net/jme.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/jme.c b/drivers/net/jme.c
index 0ea0da32d7d8..095f8998714f 100644
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -989,6 +989,7 @@ jme_process_receive(struct jme_adapter *jme, int limit)
989 goto out; 989 goto out;
990 --limit; 990 --limit;
991 991
992 rmb();
992 desccnt = rxdesc->descwb.desccnt & RXWBDCNT_DCNT; 993 desccnt = rxdesc->descwb.desccnt & RXWBDCNT_DCNT;
993 994
994 if (unlikely(desccnt > 1 || 995 if (unlikely(desccnt > 1 ||