From: Stefan Hajnoczi <stefanha@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [PATCH 0/2] block/export: Fix crash on error after iothread conflict
Date: Wed, 28 Apr 2021 10:46:57 +0100 [thread overview]
Message-ID: <YIkvEcMGbDrJRbos@stefanha-x1.localdomain> (raw)
In-Reply-To: <20210422145335.65814-1-mreitz@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]
On Thu, Apr 22, 2021 at 04:53:33PM +0200, Max Reitz wrote:
> Hi,
>
> By passing the @iothread option to block-export-add, the new export can
> be moved to the given iothread. This may conflict with an existing
> parent of the node in question. How this conflict is resolved, depends
> on @fixed-iothread: If that option is true, the error is fatal and
> block-export-add fails. If it is false, the error is ignored and the
> node stays in its original iothread.
>
> However, in the implementation, the ignored error is still in *errp, and
> so if a second error occurs afterwards and tries to put something into
> *errp, that will fail an assertion.
>
> To really ignore the error, we have to free it and clear *errp (with an
> ERRP_GUARD()).
>
> Patch 1 is the fix, patch 2 a regression test.
>
>
> Max Reitz (2):
> block/export: Free ignored Error
> iotests/307: Test iothread conflict for exports
>
> block/export/export.c | 4 ++++
> tests/qemu-iotests/307 | 15 +++++++++++++++
> tests/qemu-iotests/307.out | 8 ++++++++
> 3 files changed, 27 insertions(+)
>
> --
> 2.30.2
>
Thanks for fixing this!
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2021-04-28 9:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 14:53 [PATCH 0/2] block/export: Fix crash on error after iothread conflict Max Reitz
2021-04-22 14:53 ` [PATCH 1/2] block/export: Free ignored Error Max Reitz
2021-04-26 9:44 ` Vladimir Sementsov-Ogievskiy
2021-04-26 10:33 ` Max Reitz
2021-04-26 11:01 ` Vladimir Sementsov-Ogievskiy
2021-04-22 14:53 ` [PATCH 2/2] iotests/307: Test iothread conflict for exports Max Reitz
2021-04-26 10:09 ` Vladimir Sementsov-Ogievskiy
2021-04-28 9:46 ` Stefan Hajnoczi [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=YIkvEcMGbDrJRbos@stefanha-x1.localdomain \
--to=stefanha@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).