From: Markus Armbruster <armbru@redhat.com>
To: David Hamilton <dahamilt0@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH v2 2/2] hw/misc/ivshmem-pci: Check error after setup_interrupt() in process_msg_connect()
Date: Wed, 25 Feb 2026 14:26:42 +0100 [thread overview]
Message-ID: <87a4wxkl7x.fsf@pond.sub.org> (raw)
In-Reply-To: <20260225121323.5395-3-dahamilt0@gmail.com> (David Hamilton's message of "Wed, 25 Feb 2026 07:13:23 -0500")
David Hamilton <dahamilt0@gmail.com> writes:
> setup_interrupt() can fail and report via errp, but
> process_msg_connect() was ignoring the error and continuing
> to ivshmem_add_eventfd(). Check the bool return to avoid
> operating on a vector whose interrupt setup failed.
>
> Resolves the TODO comment at the call site.
>
> Signed-off-by: David Hamilton <dahamilt0@gmail.com>
> ---
> hw/misc/ivshmem-pci.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/hw/misc/ivshmem-pci.c b/hw/misc/ivshmem-pci.c
> index c987eebb98..f1262fa5f7 100644
> --- a/hw/misc/ivshmem-pci.c
> +++ b/hw/misc/ivshmem-pci.c
> @@ -553,8 +553,9 @@ static void process_msg_connect(IVShmemState *s, uint16_t posn, int fd,
> }
>
> if (posn == s->vm_id) {
> - setup_interrupt(s, vector, errp);
> - /* TODO do we need to handle the error? */
> + if (!setup_interrupt(s, vector, errp)) {
Any cleanup needed here? Error returns above close(fd).
> + return;
> + }
> }
>
> if (ivshmem_has_feature(s, IVSHMEM_IOEVENTFD)) {
prev parent reply other threads:[~2026-02-25 13:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 12:13 [PATCH v2 0/2] hw/misc/ivshmem-pci: Improve error handling David Hamilton
2026-02-25 12:13 ` [PATCH v2 1/2] hw/misc/ivshmem-pci: Handle error from kvm_irqchip_add_irqfd_notifier_gsi() David Hamilton
2026-02-25 13:27 ` Markus Armbruster
2026-02-25 12:13 ` [PATCH v2 2/2] hw/misc/ivshmem-pci: Check error after setup_interrupt() in process_msg_connect() David Hamilton
2026-02-25 13:26 ` 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=87a4wxkl7x.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=dahamilt0@gmail.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 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.