qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Bulekov <alxndr@bu.edu>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH] softmmu/vl: Include "qemu/rcu.h" for rcu_disable_atfork()
Date: Thu, 9 Jul 2020 11:25:31 -0400	[thread overview]
Message-ID: <20200709152531.meffwc6sw2tqbpha@mozz.bu.edu> (raw)
In-Reply-To: <20200709133411.23929-1-philmd@redhat.com>

Reviewed-by: Alexander Bulekov <alxndr@bu.edu>

If rcu.h should be explicitly included, should any of these other files
that reference the rcu but do not explicitly #include qemu/rcu.h also
get such includes?

util/qht.c
166:    struct rcu_head rcu;

migration/savevm.c
1822:    rcu_register_thread();

util/log.c
43:    rcu_read_lock();

linux-user/syscall.c
6000:    rcu_register_thread();

hw/virtio/virtio.c
74:    struct rcu_head rcu;

target/arm/kvm.c
998:    rcu_read_lock();

On 200709 1534, Philippe Mathieu-Daudé wrote:
> In commit 73c6e4013b we let vl.c use rcu_disable_atfork()
> which is declared in "qemu/rcu.h", but forgot to include
> this header. Fortunately has never been a problem since
> vl.c includes "exec/memory.h" which includes "qemu/rcu.h".
> 
> Include the missing header now in case we split vl.c later.
> 
> Fixes: 73c6e4013b ("rcu: disable pthread_atfork callbacks ASAP")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  softmmu/vl.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index ecbc18ba75..f243745c51 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -83,6 +83,7 @@
>  #include "qemu/config-file.h"
>  #include "qemu-options.h"
>  #include "qemu/main-loop.h"
> +#include "qemu/rcu.h"
>  #ifdef CONFIG_VIRTFS
>  #include "fsdev/qemu-fsdev.h"
>  #endif
> -- 
> 2.21.3
> 
> 


  reply	other threads:[~2020-07-09 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 13:34 [PATCH] softmmu/vl: Include "qemu/rcu.h" for rcu_disable_atfork() Philippe Mathieu-Daudé
2020-07-09 15:25 ` Alexander Bulekov [this message]
2020-07-09 15:51   ` Philippe Mathieu-Daudé

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=20200709152531.meffwc6sw2tqbpha@mozz.bu.edu \
    --to=alxndr@bu.edu \
    --cc=pbonzini@redhat.com \
    --cc=philmd@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).