commit | 841df922417eb82c835e93d4b93eb6a68c99d599 | [log] [tgz] |
---|---|---|
author | Jason Wang <[email protected]> | Thu Dec 13 10:53:37 2018 +0800 |
committer | David S. Miller <[email protected]> | Wed Dec 12 21:56:19 2018 -0800 |
tree | 0286f8784c5eafeda7b38db9cc989780b34387cf | |
parent | 3b076cfe86be3784dee93cfd83d6913a9ef530ee [diff] |
vhost: make sure used idx is seen before log in vhost_add_used_n() We miss a write barrier that guarantees used idx is updated and seen before log. This will let userspace sync and copy used ring before used idx is update. Fix this by adding a barrier before log_write(). Fixes: 8dd014adfea6f ("vhost-net: mergeable buffers support") Acked-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Jason Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>