Bharata B Rao [bhar...@linux.ibm.com] wrote:
> On Sat, Dec 14, 2019 at 06:12:08PM -0800, Sukadev Bhattiprolu wrote:
> > +unsigned long kvmppc_h_svm_init_abort(struct kvm *kvm)
> > +{
> > +   int i;
> > +
> > +   if (!(kvm->arch.secure_guest & KVMPPC_SECURE_INIT_START))
> > +           return H_UNSUPPORTED;
> > +
> > +   for (i = 0; i < KVM_ADDRESS_SPACE_NUM; i++) {
> > +           struct kvm_memory_slot *memslot;
> > +           struct kvm_memslots *slots = __kvm_memslots(kvm, i);
> > +
> > +           if (!slots)
> > +                   continue;
> > +
> > +           kvm_for_each_memslot(memslot, slots)
> > +                   kvmppc_uvmem_drop_pages(memslot, kvm, false);
> > +   }
> 
> You need to hold srcu_read_lock(&kvm->srcu) here.

Yes, thanks! Fixed in the next version.

Sukadev

Reply via email to