From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
borntraeger@de.ibm.com
Subject: Re: [PATCH] KVM: avoid using rcu_dereference_protected
Date: Wed, 2 Aug 2017 22:16:33 +0200 [thread overview]
Message-ID: <20170802201633.GA32403@flask> (raw)
In-Reply-To: <1501689354-18699-1-git-send-email-pbonzini@redhat.com>
2017-08-02 17:55+0200, Paolo Bonzini:
> During teardown, accesses to memslots and buses are using
> rcu_dereference_protected with an always-true condition because
> these accesses are done outside the usual mutexes. This
> is because the last reference is gone and there cannot be any
> concurrent modifications, but rcu_dereference_protected is
> ugly and unobvious.
>
> Instead, check the refcount in kvm_get_bus and __kvm_memslots.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
Probably looks nicer than temporarily taking the slots_lock.
Queued for 4.13,
thanks.
next prev parent reply other threads:[~2017-08-02 20:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 15:55 [PATCH] KVM: avoid using rcu_dereference_protected Paolo Bonzini
2017-08-02 20:16 ` Radim Krčmář [this message]
2017-09-13 10:16 ` Christian Borntraeger
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=20170802201633.GA32403@flask \
--to=rkrcmar@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.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.