Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 ||