From: Markus Armbruster <armbru@redhat.com>
To: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Cc: qemu-devel@nongnu.org, "Michael Roth" <michael.roth@amd.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [PATCH] error: Rewrite &error_warn with ERRP_GUARD()
Date: Fri, 08 Aug 2025 10:13:35 +0200 [thread overview]
Message-ID: <87pld6kz80.fsf@pond.sub.org> (raw)
In-Reply-To: <20250803-errp-v1-1-a59a73f63289@rsg.ci.i.u-tokyo.ac.jp> (Akihiko Odaki's message of "Sun, 03 Aug 2025 23:52:57 +0900")
Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> writes:
> Without rewrite, an warning message may be printed before
> error_prepend(); in such a scenario, error_prepend() will results in
> NULL dereference because error_warn is NULL.
>
> Rewrite &error_warn with ERRP_GUARD() to make sure error_prepend() is
> reflected to printed messages and to avoid NULL dereference.
>
> Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
You're right. Needs
Fixes: 3ffef1a55ca3 (error: add global &error_warn destination)
However, there's still more to fix up, and &error_warn is rarely used.
I just posted patches to delete it instead:
[PATCH 00/12] Error reporting cleanup, a fix, and &error_warn removal
Thank you!
prev parent reply other threads:[~2025-08-08 8:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-03 14:52 [PATCH] error: Rewrite &error_warn with ERRP_GUARD() Akihiko Odaki
2025-08-08 8:13 ` Markus Armbruster [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=87pld6kz80.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=michael.roth@amd.com \
--cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.