qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] block/backup-top: fix failure path


From: Max Reitz
Subject: Re: [PATCH 1/2] block/backup-top: fix failure path
Date: Mon, 20 Jan 2020 17:50:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1

On 16.01.20 16:54, Vladimir Sementsov-Ogievskiy wrote:
> We can't access top after call bdrv_backup_top_drop, as it is already
> freed at this time.
> 
> Also, no needs to unref target child by hand, it will be unrefed on
> bdrv_close() automatically.
> 
> So, just do bdrv_backup_top_drop if append succeed and one bdrv_unref
> otherwise.
> 
> Note, that in !appended case bdrv_unref(top) moved into drained section
> on source. It doesn't really matter, but just for code simplicity.
> 
> Fixes: 7df7868b96404
> Cc: address@hidden # v4.2.0
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
>  block/backup-top.c | 21 ++++++++++++---------
>  1 file changed, 12 insertions(+), 9 deletions(-)

Reviewed-by: Max Reitz <address@hidden>

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]