Re: [PATCH 2/2] KVM: async_pf: mm-mm_users can not pin apf-mm

2014-04-22 Thread Christian Borntraeger
On 21/04/14 15:26, Oleg Nesterov wrote: get_user_pages(mm) is simply wrong if mm-mm_users == 0 and exit_mmap/etc was already called (or is in progress), mm-mm_count can only pin mm-pgd and mm_struct itself. Change kvm_setup_async_pf/async_pf_execute to inc/dec mm-mm_users.

[PATCH 2/2] KVM: async_pf: mm-mm_users can not pin apf-mm

2014-04-21 Thread Oleg Nesterov
get_user_pages(mm) is simply wrong if mm-mm_users == 0 and exit_mmap/etc was already called (or is in progress), mm-mm_count can only pin mm-pgd and mm_struct itself. Change kvm_setup_async_pf/async_pf_execute to inc/dec mm-mm_users. kvm_create_vm/kvm_destroy_vm play with -mm_count too but this