]> git.baikalelectronics.ru Git - kernel.git/commit
xen-scsiback: mark pvscsi frontend request consumed only after last read
authorJuergen Gross <jgross@suse.com>
Tue, 17 Feb 2015 07:02:47 +0000 (08:02 +0100)
committerDavid Vrabel <david.vrabel@citrix.com>
Mon, 23 Feb 2015 16:30:25 +0000 (16:30 +0000)
commitb5b8a91db93064663e2724d59ffc6dd8092b7265
tree347b42c4e22eef494f5a896b8f81e8b80a6d5efc
parenta8a7b786927ae4051af45efc2e3b97756ad13d4e
xen-scsiback: mark pvscsi frontend request consumed only after last read

A request in the ring buffer mustn't be read after it has been marked
as consumed. Otherwise it might already have been reused by the
frontend without violating the ring protocol.

To avoid inconsistencies in the backend only work on a private copy
of the request. This will ensure a malicious guest not being able to
bypass consistency checks of the backend by modifying an active
request.

Signed-off-by: Juergen Gross <jgross@suse.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
drivers/xen/xen-scsiback.c