]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen-blkback: only read request operation from shared ring once
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 3 Nov 2015 16:34:09 +0000 (16:34 +0000)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 18 Dec 2015 15:44:47 +0000 (10:44 -0500)
commit9471898cbdd1b8fe930010ce8c6fbd2e48f8b6fe
tree98134e6a38735690893dfef7fe4eacea3a10fb3c
parent9fd3dc7a4198ee4c1d478a9b290cf5ead6a4a046
xen-blkback: only read request operation from shared ring once

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.

CC: stable@vger.kernel.org
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>
(cherry picked from commit 1f13d75ccb806260079e0679d55d9253e370ec8a)
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/block/xen-blkback/common.h