Commit ea192aa8 authored by Guo-Fu Tseng's avatar Guo-Fu Tseng Committed by David S. Miller

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: default avatarStefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: default avatarGuo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3ee94018
......@@ -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 ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment