All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@redhat.com>
To: qemu-devel@nongnu.org
Cc: "GuoHan Zhao" <zhaoguohan@kylinos.cn>,
	"Eric Farman" <farman@linux.ibm.com>,
	"Matthew Rosato" <mjrosato@linux.ibm.com>,
	"Cédric Le Goater" <clg@redhat.com>
Subject: [PULL 08/11] vfio/ccw: Return false when IRQ notifier setup fails
Date: Wed, 20 May 2026 18:21:12 +0200	[thread overview]
Message-ID: <20260520162115.1613601-9-clg@redhat.com> (raw)
In-Reply-To: <20260520162115.1613601-1-clg@redhat.com>

From: GuoHan Zhao <zhaoguohan@kylinos.cn>

vfio_ccw_register_irq_notifier() cleans up the fd handler and EventNotifier
when vfio_device_irq_set_signaling() fails, but still returns true to its
caller.

Return false after cleanup so the caller can handle the failed
registration path instead of treating it as a successful notifier setup.

Fixes: 8aaeff97acee ("vfio/ccw: Make vfio_ccw_register_irq_notifier() return a bool")
Signed-off-by: GuoHan Zhao <zhaoguohan@kylinos.cn>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260510084353.58263-3-zhaoguohan@kylinos.cn
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
 hw/vfio/ccw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index ff6ab9a7408f01b9e64ba06f2c8da4a69fa1f9ff..c3dc7c19623556ea452344b8e4b76fb9a56206c7 100644
--- a/hw/vfio/ccw.c
+++ b/hw/vfio/ccw.c
@@ -431,6 +431,7 @@ static bool vfio_ccw_register_irq_notifier(VFIOCCWDevice *vcdev,
                                        VFIO_IRQ_SET_ACTION_TRIGGER, fd, errp)) {
         qemu_set_fd_handler(fd, NULL, NULL, vcdev);
         event_notifier_cleanup(notifier);
+        return false;
     }
 
     return true;
-- 
2.54.0



  parent reply	other threads:[~2026-05-20 16:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20 16:21 [PULL 00/11] vfio queue Cédric Le Goater
2026-05-20 16:21 ` [PULL 01/11] target/s390x: restore cpu_models for system builds Cédric Le Goater
2026-05-20 16:21 ` [PULL 02/11] hw/vfio: Drop superfluous inclusion of hw-error.h Cédric Le Goater
2026-05-20 16:21 ` [PULL 03/11] vfio-user: avoid leaking duplicate device name Cédric Le Goater
2026-05-20 16:21 ` [PULL 04/11] vfio-user: reject malformed migration capabilities Cédric Le Goater
2026-05-20 16:21 ` [PULL 05/11] hw/remote: update libvfio-user subproject Cédric Le Goater
2026-05-20 16:21 ` [PULL 06/11] vfio/pci: Replace abort() with g_assert_not_reached() Cédric Le Goater
2026-05-20 16:21 ` [PULL 07/11] vfio/ap: Return false when IRQ notifier setup fails Cédric Le Goater
2026-05-20 16:21 ` Cédric Le Goater [this message]
2026-05-20 16:21 ` [PULL 09/11] update-linux-headers: Inject VIRTIO_RING_NO_LEGACY in virtio_ring.h Cédric Le Goater
2026-05-20 16:21 ` [PULL 10/11] vfio/migration: Detect and report overflow in migration size queries Cédric Le Goater
2026-05-20 16:21 ` [PULL 11/11] scripts/update-linux-headers: Add typelimits.h Cédric Le Goater
2026-05-20 22:21 ` [PULL 00/11] vfio queue Stefan Hajnoczi

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=20260520162115.1613601-9-clg@redhat.com \
    --to=clg@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhaoguohan@kylinos.cn \
    /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.