qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] block: fix permission update in bdrv_replace_no


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH] block: fix permission update in bdrv_replace_node
Date: Mon, 26 Aug 2019 13:21:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 24.08.19 12:07, Vladimir Sementsov-Ogievskiy wrote:
> It's wrong to OR shared permissions. It may lead to crash on further
> permission updates.
> Also, no needs to consider previously calculated permissions, as at
> this point we already bind all new parents and bdrv_get_cumulative_perm
> result is enough. So fix the bug by just set permissions by
> bdrv_get_cumulative_perm result.
> 
> Bug was introduced in long ago 234ac1a9025, in 2.9.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
> 
> Hi all!
> 
> I found this bug during my work around backup-top filter. It happens that
> on filter removing, bdrv_replace_node() breaks permissions in graph which
> lead to bdrv_set_backing_hd(new backing: NULL) on
> assert(tighten_restrictions == false).
> 
>  block.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Thanks, that makes sense.

Applied to my block branch:

https://git.xanclic.moe/XanClic/qemu/commits/branch/block

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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