Hello,
On 4/24/26 04:39, zhaoguohan@kylinos.cn wrote:
> From: GuoHan Zhao <zhaoguohan@kylinos.cn>
>
> vfio_ap_register_irq_notifier() and vfio_ccw_register_irq_notifier() clean
> up the fd handler and EventNotifier when vfio_device_irq_set_signaling()
> fails, but still return true to their callers.
>
> Return false after cleanup so callers can handle the failed registration
> path instead of treating it as a successful notifier setup.
>
> Signed-off-by: GuoHan Zhao <zhaoguohan@kylinos.cn>
> ---
> hw/vfio/ap.c | 1 +
> hw/vfio/ccw.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
> index 276ae8c207bf..6e2a1223ea8d 100644
> --- a/hw/vfio/ap.c
> +++ b/hw/vfio/ap.c
> @@ -193,6 +193,7 @@ static bool vfio_ap_register_irq_notifier(VFIOAPDevice *vapdev,
> errp)) {
> qemu_set_fd_handler(fd, NULL, NULL, vapdev);
> event_notifier_cleanup(notifier);
> + return false;
> }
>
> return true;
> diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
> index ff6ab9a7408f..c3dc7c196235 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;
The issue was introduced by :
Fixes: cbd470f0aac5 ("vfio/ap: Make vfio_ap_register_irq_notifier() return a bool")
Fixes: 8aaeff97acee ("vfio/ccw: Make vfio_ccw_register_irq_notifier() return a bool")
Could you please resend two patches ?
thanks,
C.