lkml.org 
[lkml]   [2017]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] KVM: avoid using rcu_dereference_protected
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.

\
 
 \ /
  Last update: 2017-08-02 22:17    [W:1.414 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site