Re: [Qemu-devel] qcow2 not cleaning up during image create failure

2017-07-14 Thread Eric Blake
On 07/14/2017 06:57 AM, Fam Zheng wrote: > On Fri, 07/14 12:00, Daniel P. Berrange wrote: >> I've just been looking at the qcow2 image creation code, and found that >> if any method in qcow2_create2() returns an error, then we'll report that, >> but leave the newly created image file on disk in som

Re: [Qemu-devel] qcow2 not cleaning up during image create failure

2017-07-14 Thread Daniel P. Berrange
On Fri, Jul 14, 2017 at 07:57:43PM +0800, Fam Zheng wrote: > On Fri, 07/14 12:00, Daniel P. Berrange wrote: > > I've just been looking at the qcow2 image creation code, and found that > > if any method in qcow2_create2() returns an error, then we'll report that, > > but leave the newly created imag

Re: [Qemu-devel] qcow2 not cleaning up during image create failure

2017-07-14 Thread Fam Zheng
On Fri, 07/14 12:00, Daniel P. Berrange wrote: > I've just been looking at the qcow2 image creation code, and found that > if any method in qcow2_create2() returns an error, then we'll report that, > but leave the newly created image file on disk in some partially initialized > state. A user may un

[Qemu-devel] qcow2 not cleaning up during image create failure

2017-07-14 Thread Daniel P. Berrange
I've just been looking at the qcow2 image creation code, and found that if any method in qcow2_create2() returns an error, then we'll report that, but leave the newly created image file on disk in some partially initialized state. A user may unwittingly use this file later with undefined behaviour.