git://bbs.cooldavid.org
/
jme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f79361a
)
jme: Prevent possible read re-order error
author
Guo-Fu Tseng
<cooldavid@cooldavid.org>
Mon, 18 Oct 2010 11:56:20 +0000
(19:56 +0800)
committer
Guo-Fu Tseng
<cooldavid@cooldavid.org>
Mon, 18 Oct 2010 23:50:42 +0000
(07:50 +0800)
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>
jme.c
patch
|
blob
|
blame
|
history
diff --git
a/jme.c
b/jme.c
index 0ea0da32d7d8fd00cb0c39a54f6d11f3913f758d..095f8998714f599784354358169eb5b7fc320755 100644
(file)
--- a/
jme.c
+++ b/
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 ||