android_kernel_google_msm/drivers/block/xen-blkback
Roger Pau Monné a7bc1af57e xen-blkback: only read request operation from shared ring once
commit 1f13d75ccb806260079e0679d55d9253e370ec8a upstream.

A compiler may load a switch statement value multiple times, which could
be bad when the value is in memory shared with the frontend.

When converting a non-native request to a native one, ensure that
src->operation is only loaded once by using READ_ONCE().

This is part of XSA155.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[lizf: Backported to 3.4:
 - adjust context
 - call ACCESS_ONCE instead of READ_ONCE]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2016-10-26 23:15:39 +08:00
..
blkback.c xen/blkback: Check for insane amounts of request on the ring (v6). 2014-03-11 16:10:07 -07:00
common.h xen-blkback: only read request operation from shared ring once 2016-10-26 23:15:39 +08:00
Makefile
xenbus.c xen/blkback: Check for insane amounts of request on the ring (v6). 2014-03-11 16:10:07 -07:00