Re: [PATCH 1/1] powerpc/kvm/book3s: Fixes possible 'use after release' of kvm
From: Leonardo Bras
Date: Wed Nov 27 2019 - 15:19:20 EST
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
Attachment:
signature.asc
Description: This is a digitally signed message part