[PATCH 1/1] powerpc/kvm/book3s: Fixes possible 'use after release' of kvm

Leonardo Bras leonardo at linux.ibm.com
Thu Nov 28 07:18:57 AEDT 2019


On Wed, 2019-11-27 at 17:40 +0100, Paolo Bonzini wrote:
> >   
> >        if (ret >= 0)
> >                list_add_rcu(&stt->list, &kvm->arch.spapr_tce_tables);
> > -     else
> > -             kvm_put_kvm(kvm);
> >   
> >        mutex_unlock(&kvm->lock);
> >   
> >        if (ret >= 0)
> >                return ret;
> >   
> > +     kvm_put_kvm(kvm);
> >        kfree(stt);
> >    fail_acct:
> >        account_locked_vm(current->mm, kvmppc_stt_pages(npages), false);
> 
> This part is a good change, as it makes the code clearer.  The
> virt/kvm/kvm_main.c bits, however, are not necessary as explained by Sean.
> 

Thanks!
So, like this patch?
https://lkml.org/lkml/2019/11/7/763

Best regards,

Leonardo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20191127/f0ae944a/attachment.sig>


More information about the Linuxppc-dev mailing list