From ea192aa89c3b26d56113e70c72238f6951d4097f Mon Sep 17 00:00:00 2001 From: Guo-Fu Tseng Date: Mon, 18 Oct 2010 14:10:42 +0000 Subject: [PATCH] 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 Signed-off-by: Guo-Fu Tseng Signed-off-by: David S. Miller --- drivers/net/jme.c | 1 + 1 file changed, 1 insertion(+) 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) goto out; --limit; + rmb(); desccnt = rxdesc->descwb.desccnt & RXWBDCNT_DCNT; if (unlikely(desccnt > 1 || -- GitLab