aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2021-02-16 13:02:47 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2021-02-16 17:15:39 +0100
commit82e2756897810b6e17e0c352101878b97b1e2688 (patch)
tree4aa70d58a480f305030e31437d9493bd300e72d0 /util
parent106f91d59c373b63f227b8827ff18ac9c9068d2f (diff)
downloadqemu-82e2756897810b6e17e0c352101878b97b1e2688.zip
qemu-82e2756897810b6e17e0c352101878b97b1e2688.tar.gz
qemu-82e2756897810b6e17e0c352101878b97b1e2688.tar.bz2
event_notifier: Set ->initialized earlier in event_notifier_init()
Otherwise the call to event_notifier_set() is a nop, which causes the SLOF firmware on POWER to hang when booting from a virtio-scsi device: virtio_scsi_dataplane_start() virtio_scsi_vring_init() virtio_bus_set_host_notifier() <- assign == true event_notifier_init() <- active == 1 event_notifier_set() <- fails right away if !e->initialized Fixes: e34e47eb28c0 ("event_notifier: handle initialization failure better") Cc: mlevitsk@redhat.com Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <20210216120247.1293569-1-groug@kaod.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'util')
-rw-r--r--util/event_notifier-posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/event_notifier-posix.c b/util/event_notifier-posix.c
index 5b2110e..8307013 100644
--- a/util/event_notifier-posix.c
+++ b/util/event_notifier-posix.c
@@ -66,10 +66,10 @@ int event_notifier_init(EventNotifier *e, int active)
e->rfd = fds[0];
e->wfd = fds[1];
}
+ e->initialized = true;
if (active) {
event_notifier_set(e);
}
- e->initialized = true;
return 0;
fail: