https://github.com/torvalds/linux
Revision 41c22f626254b9dc0376928cae009e73d1b6a49a authored by Oleg Nesterov on 21 April 2014, 13:26:01 UTC, committed by Paolo Bonzini on 28 April 2014, 11:04:46 UTC
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 case looks
fine at first glance, it seems that this ->mm is only used to verify that
current->mm == kvm->mm.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 5c8818b
History
Tip revision: 41c22f626254b9dc0376928cae009e73d1b6a49a authored by Oleg Nesterov on 21 April 2014, 13:26:01 UTC
KVM: async_pf: mm->mm_users can not pin apf->mm
Tip revision: 41c22f6
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1.1 KB
.mailmap -rw-r--r-- 4.4 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 93.6 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 271.6 KB
Makefile -rw-r--r-- 50.5 KB
README -rw-r--r-- 18.3 KB
REPORTING-BUGS -rw-r--r-- 7.3 KB

README

back to top