qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] block: fix permission update in bdrv_replace_node
Date: Mon, 26 Aug 2019 13:21:55 +0200	[thread overview]
Message-ID: <01661ed8-9bf5-4d1e-5637-2669d4df23a3@redhat.com> (raw)
In-Reply-To: <20190824100740.61635-1-vsementsov@virtuozzo.com>


[-- Attachment #1.1: Type: text/plain, Size: 1016 bytes --]

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 <vsementsov@virtuozzo.com>
> ---
> 
> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2019-08-26 11:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-24 10:07 [Qemu-devel] [PATCH] block: fix permission update in bdrv_replace_node Vladimir Sementsov-Ogievskiy
2019-08-26 11:21 ` Max Reitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01661ed8-9bf5-4d1e-5637-2669d4df23a3@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).