aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2009-08-06 14:39:44 -0300
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-08 20:17:01 -0700
commitf897f01e79c99ec8577ed6bb6c9bec845747dc3c (patch)
treedf3db5592ee2d8ce4fbc9c39b4bddb370d0972f8
parent838c160be4225b74a1fdd6e549df272e3953ebd8 (diff)
KVM: Allocate guest memory as MAP_PRIVATE, not MAP_SHARED
(cherry picked from commit acee3c04e8208c17aad1baff99baa68d71640a19) There is no reason to share internal memory slots with fork()ed instances. Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--arch/x86/kvm/x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index a29b440b3c2..8d45d35f8aa 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4003,7 +4003,7 @@ int kvm_arch_set_memory_region(struct kvm *kvm,
userspace_addr = do_mmap(NULL, 0,
npages * PAGE_SIZE,
PROT_READ | PROT_WRITE,
- MAP_SHARED | MAP_ANONYMOUS,
+ MAP_PRIVATE | MAP_ANONYMOUS,
0);
up_write(&current->mm->mmap_sem);