]> git.baikalelectronics.ru Git - kernel.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:00:32 +0000 (10:00 -0500)
commitb5d4275bfbb74a23056c77d9c9c34b9cb3149d47
treea791cbe758b8c1c4feaf3a88603c7f96f7a4b7ba
parenta0c923ff68ef482027dabcdd8019f85c76b0ec45
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>
drivers/block/xen-blkback/common.h