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>
This commit is contained in:
Guo-Fu Tseng 2010-10-18 14:10:42 +00:00 коммит произвёл David S. Miller
Родитель 3ee94018a9
Коммит ea192aa89c
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -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 ||