lkml.org 
[lkml]   [2016]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PART1 RFC v4 02/11] KVM: x86: Introducing kvm_x86_ops VM init/uninit hooks
From
Date
Paolo,

On 04/12/2016 04:55 PM, Paolo Bonzini wrote:
>
>
> On 11/04/2016 22:49, Radim Krčmář wrote:
>>>> @@ -7781,6 +7784,9 @@ static void kvm_free_vcpus(struct kvm *kvm)
>>>> kvm_for_each_vcpu(i, vcpu, kvm)
>>>> kvm_arch_vcpu_free(vcpu);
>>>>
>>>> + if (kvm_x86_ops->vm_uninit)
>>>> + kvm_x86_ops->vm_uninit(kvm);
>> vm_uninit() doesn't seem to have much to do with kvm_free_vcpus(),
>> please call it from kvm_arch_destroy_vm().
>>
>> (kvm_x86_ops.vm_destroy would be a better name then.)
>
> Especially, you're calling it with struct kvm full of dangling pointer,
> so please call it early, right after the "if (current->mm == kvm->mm)"
> block.
>
> Paolo

Good point.

Thanks,
Suravee

\
 
 \ /
  Last update: 2016-04-19 00:21    [W:0.068 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site