[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 13/15] qemu-img: Allow rebase with no input base
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PULL 13/15] qemu-img: Allow rebase with no input base |
Date: |
Mon, 20 May 2019 16:33:03 +0100 |
On Fri, 10 May 2019 at 17:37, Kevin Wolf <address@hidden> wrote:
>
> From: Max Reitz <address@hidden>
>
> Currently, without -u, you cannot add a backing file to an image when it
> currently has none:
>
> $ qemu-img rebase -b base.qcow2 foo.qcow2
> qemu-img: Could not open old backing file '': The 'file' block driver
> requires a file name
>
> It is really simple to allow this, though (effectively by setting
> old_backing_size to 0), so this patch does just that.
>
> Signed-off-by: Max Reitz <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> Signed-off-by: Kevin Wolf <address@hidden>
Hi -- Coverity reports some new "resource leak" errors
in the qemu-img.c img_rebase() function:
* CID 1401415 : Coverity complains that the memory assigned
to out_real_path gets leaked if we take the immediately
following "if (local_err) ... goto out" error-exit path.
This may be another instance of Coverity not understanding
that the function won't return non-NULL if errp is set.
* CID 1401416 : leak of the 'options' qdict in this
error-exit code path. This looks like a real issue (and
there seem to be other error-exit codepaths earlier in
the function which leak this too.)
Would somebody like to have a look at these?
thanks
-- PMM
- [Qemu-devel] [PULL 05/15] blockjob: Fix coroutine thread after AioContext change, (continued)
- [Qemu-devel] [PULL 05/15] blockjob: Fix coroutine thread after AioContext change, Kevin Wolf, 2019/05/10
- [Qemu-devel] [PULL 06/15] test-block-iothread: Job coroutine thread after AioContext switch, Kevin Wolf, 2019/05/10
- [Qemu-devel] [PULL 07/15] qemu-img: Use IEC binary prefixes for size constants, Kevin Wolf, 2019/05/10
- [Qemu-devel] [PULL 08/15] qcow2: Replace bdrv_write() with bdrv_pwrite(), Kevin Wolf, 2019/05/10
- [Qemu-devel] [PULL 09/15] vdi: Replace bdrv_{read, write}() with bdrv_{pread, pwrite}(), Kevin Wolf, 2019/05/10
- [Qemu-devel] [PULL 11/15] block: Remove bdrv_read() and bdrv_write(), Kevin Wolf, 2019/05/10
- [Qemu-devel] [PULL 10/15] vvfat: Replace bdrv_{read, write}() with bdrv_{pread, pwrite}(), Kevin Wolf, 2019/05/10
- [Qemu-devel] [PULL 12/15] qcow2: Remove BDRVQcow2State.cluster_sectors, Kevin Wolf, 2019/05/10
- [Qemu-devel] [PULL 14/15] qemu-img: Use zero writes after source backing EOF, Kevin Wolf, 2019/05/10
- [Qemu-devel] [PULL 13/15] qemu-img: Allow rebase with no input base, Kevin Wolf, 2019/05/10
- Re: [Qemu-devel] [PULL 13/15] qemu-img: Allow rebase with no input base,
Peter Maydell <=
- [Qemu-devel] [PULL 15/15] iotests: Add test for rebase without input base, Kevin Wolf, 2019/05/10
- Re: [Qemu-devel] [PULL 00/15] Block layer patches, Peter Maydell, 2019/05/13