]> xenbits.xensource.com Git - qemu-xen-3.4-testing.git/commit
check for bs->drv in bdrv_flush (Christoph Hellwig)
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 7 Oct 2009 14:51:55 +0000 (15:51 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 13 Oct 2009 16:33:23 +0000 (17:33 +0100)
commitb5e7982ade668d18e07f51401d9af04d612c3be3
treeed69a099b6c8300524341e937d205899c1b7c3c2
parent20976815da3884bd45b6775b9af0c650c9bc2d86
check for bs->drv in bdrv_flush (Christoph Hellwig)

All the bdrv_ helpers should check for bs->drv being zero as that means
there is no backend image open.  bdrv_flush fails to perform that check
and can thus cause NULL pointer dereferences.

Found using qemu-io.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6943 c046a42c-6fe2-441c-8c8c-71466251a162

[ Backported from 6bbff9a0b495918309074ac60375be5f9dc868b3
  by Stefano Stabellini. ]

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
(cherry picked from commit dddf85563a18db9ae83d59ad567f4d77d39da821)
block.c