[Re: [PATCH-next v2] kvm: don't try to take mmu_lock while holding the main raw
kvm_lock] On 26/06/2013 (Wed 23:59) Paolo Bonzini wrote:
> Il 26/06/2013 20:11, Paul Gortmaker ha scritto:
> > spin_unlock(&kvm->mmu_lock);
> > + kvm_put_kvm(kvm);
> > srcu_read_unlock(&kvm->srcu, idx);
> >
>
> kvm_put_kvm needs to go last. I can fix when applying, but I'll wait
> for Gleb to take a look too.
I'm curious why you would say that -- since the way I sent it has the
lock tear down be symmetrical and opposite to the build up - e.g.
idx = srcu_read_lock(&kvm->srcu);
[...]
+ kvm_get_kvm(kvm);
[...]
spin_lock(&kvm->mmu_lock);
[...]
unlock:
spin_unlock(&kvm->mmu_lock);
+ kvm_put_kvm(kvm);
srcu_read_unlock(&kvm->srcu, idx);
You'd originally said to put the kvm_get_kvm where it currently is;
perhaps instead we want the get/put to encompass the whole
srcu_read locked section?
P.
--
>
> Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html