]> git.ipfire.org Git - thirdparty/qemu.git/commit
qcow2: Check bs->drv in copy_sectors()
authorMax Reitz <mreitz@redhat.com>
Mon, 10 Mar 2014 22:44:07 +0000 (23:44 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 13 Mar 2014 13:23:27 +0000 (14:23 +0100)
commitdba2855572c746836ad90ce9154403b5929d996b
treee6f4d87aca3c7b9d74ebc6cacbba7040f4f6d8cb
parent3456a8d1852e970688b73d03fdc44dde851759e1
qcow2: Check bs->drv in copy_sectors()

Before dereferencing bs->drv for a call to its member bdrv_co_readv(),
copy_sectors() should check whether that pointer is indeed valid, since
it may have been set to NULL by e.g. a concurrent write triggering the
corruption prevention mechanism.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/qcow2-cluster.c