qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Greg Kurz <groug@kaod.org>, qemu-devel@nongnu.org
Cc: mlevitsk@redhat.com
Subject: Re: [PATCH] event_notifier: Set ->initialized earlier in event_notifier_init()
Date: Tue, 16 Feb 2021 17:12:41 +0100	[thread overview]
Message-ID: <bcb42e5b-7176-ddb3-4c23-a6006cdf7615@redhat.com> (raw)
In-Reply-To: <20210216120247.1293569-1-groug@kaod.org>

On 16/02/21 13:02, Greg Kurz wrote:
> 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>
> ---
>   util/event_notifier-posix.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/util/event_notifier-posix.c b/util/event_notifier-posix.c
> index 5b2110e86198..8307013c5df0 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:
> 

Queued, thanks.

Paolo



  reply	other threads:[~2021-02-16 16:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 12:02 [PATCH] event_notifier: Set ->initialized earlier in event_notifier_init() Greg Kurz
2021-02-16 16:12 ` Paolo Bonzini [this message]
2021-02-17 14:59 ` Maxim Levitsky

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=bcb42e5b-7176-ddb3-4c23-a6006cdf7615@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=groug@kaod.org \
    --cc=mlevitsk@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).