From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 1/2] authz-list-file: Fix file read error handling
Date: Fri, 13 Nov 2020 09:37:03 +0000 [thread overview]
Message-ID: <20201113093703.GB30434@redhat.com> (raw)
In-Reply-To: <20201113062358.2563662-2-armbru@redhat.com>
On Fri, Nov 13, 2020 at 07:23:57AM +0100, Markus Armbruster wrote:
> The Error ** argument must be NULL, &error_abort, &error_fatal, or a
> pointer to a variable containing NULL. Passing an argument of the
> latter kind twice without clearing it in between is wrong: if the
> first call sets an error, it no longer points to NULL for the second
> call.
>
> qauthz_list_file_complete() is wrong that way: it passes @errp to
> qauthz_list_file_complete() without checking for failure. If it runs
> into another failure, it trips error_setv()'s assertion. Reproducer:
>
> $ qemu-system-x86_64 -nodefaults -S -display none -object authz-list-file,id=authz0,filename=
> qemu-system-x86_64: ../util/error.c:59: error_setv: Assertion `*errp == NULL' failed.
> Aborted (core dumped)
>
> Fix it to check for failure.
>
> Fixes: 55d869846de802a16af1a50584c51737bd664387
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> authz/listfile.c | 3 +++
> 1 file changed, 3 insertions(+)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2020-11-13 9:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 6:23 [PATCH 0/2] authz-list-file: Error handling fixes Markus Armbruster
2020-11-13 6:23 ` [PATCH 1/2] authz-list-file: Fix file read error handling Markus Armbruster
2020-11-13 9:37 ` Daniel P. Berrangé [this message]
2020-11-13 6:23 ` [PATCH 2/2] authz-list-file: Improve an error message Markus Armbruster
2020-11-13 9:36 ` Daniel P. Berrangé
2020-11-13 12:54 ` Markus Armbruster
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=20201113093703.GB30434@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--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).