[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 1/6] qcow2: Fix dangling pointer after reopen for 'file'
From: |
Eric Blake |
Subject: |
Re: [PATCH v6 1/6] qcow2: Fix dangling pointer after reopen for 'file' |
Date: |
Thu, 8 Jul 2021 08:26:15 -0500 |
User-agent: |
NeoMutt/20210205-556-f84451-dirty |
On Thu, Jul 08, 2021 at 01:47:04PM +0200, Kevin Wolf wrote:
> Without an external data file, s->data_file is a second pointer with the
> same value as bs->file. When changing bs->file to a different BdrvChild
> and freeing the old BdrvChild, s->data_file must also be updated,
> otherwise it points to freed memory and causes crashes.
>
> This problem was caught by iotests case 245.
>
> Fixes: df2b7086f169239ebad5d150efa29c9bb6d4f820
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> block/qcow2.c | 29 +++++++++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
- [PATCH v6 0/6] Make blockdev-reopen stable, Kevin Wolf, 2021/07/08
- [PATCH v6 2/6] block: Add bdrv_reopen_queue_free(), Kevin Wolf, 2021/07/08
- [PATCH v6 4/6] block: Support multiple reopening with x-blockdev-reopen, Kevin Wolf, 2021/07/08
- [PATCH v6 3/6] block: Acquire AioContexts during bdrv_reopen_multiple(), Kevin Wolf, 2021/07/08
- [PATCH v6 1/6] qcow2: Fix dangling pointer after reopen for 'file', Kevin Wolf, 2021/07/08
- [PATCH v6 6/6] block: Make blockdev-reopen stable API, Kevin Wolf, 2021/07/08
- [PATCH v6 5/6] iotests: Test reopening multiple devices at the same time, Kevin Wolf, 2021/07/08