All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, KVM <kvm@vger.kernel.org>,
	Stefan Haberland <sth@linux.vnet.ibm.com>
Subject: Re: [PATCH] KVM: fix rcu warning on VM_CREATE errors
Date: Wed, 13 Sep 2017 17:40:06 +0200	[thread overview]
Message-ID: <20170913154005.GG2673@flask> (raw)
In-Reply-To: <20170913121722.108625-1-borntraeger@de.ibm.com>

2017-09-13 14:17+0200, Christian Borntraeger:
> commit 3898da947bba ("KVM: avoid using rcu_dereference_protected") can
> trigger the following lockdep/rcu splat if the VM_CREATE ioctl fails,
> for example if kvm_arch_init_vm fails:
> 
> WARNING: suspicious RCU usage
> 4.13.0+ #105 Not tainted
> -----------------------------
> ./include/linux/kvm_host.h:481 suspicious rcu_dereference_check() usage!
> 
> other info that might help us debug this:
> 
> rcu_scheduler_active = 2, debug_locks = 1
> no locks held by qemu-system-s39/79.
> stack backtrace:
> CPU: 0 PID: 79 Comm: qemu-system-s39 Not tainted 4.13.0+ #105
> Hardware name: IBM 2964 NC9 704 (KVM/Linux)
> Call Trace:
> ([<00000000001140b2>] show_stack+0xea/0xf0)
>  [<00000000008a68a4>] dump_stack+0x94/0xd8
>  [<0000000000134c12>] kvm_dev_ioctl+0x372/0x7a0
>  [<000000000038f940>] do_vfs_ioctl+0xa8/0x6c8
>  [<0000000000390004>] SyS_ioctl+0xa4/0xb8
>  [<00000000008c7a8c>] system_call+0xc4/0x27c
> no locks held by qemu-system-s39/79.
> 
> We have to reset the just created users_count back to 0 to
> tell the check to not trigger.
> 
> Reported-by: Stefan Haberland <sth@linux.vnet.ibm.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> Fixes: 3898da947bba ("KVM: avoid using rcu_dereference_protected")
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> ---

Applied, thanks.

      parent reply	other threads:[~2017-09-13 15:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 12:17 [PATCH] KVM: fix rcu warning on VM_CREATE errors Christian Borntraeger
2017-09-13 12:23 ` David Hildenbrand
2017-09-13 15:40 ` Radim Krčmář [this message]

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=20170913154005.GG2673@flask \
    --to=rkrcmar@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=sth@linux.vnet.ibm.com \
    /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.