OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac04527
)
KVM: Prevent overflow in largepages calculation
author
Avi Kivity
<avi@redhat.com>
Mon, 8 Jun 2009 12:55:21 +0000
(15:55 +0300)
committer
Avi Kivity
<avi@redhat.com>
Wed, 10 Jun 2009 12:18:16 +0000
(15:18 +0300)
If userspace specifies a memory slot that is larger than 8 petabytes, it
could overflow the largepages variable.
Cc: stable@kernel.org
Signed-off-by: Avi Kivity <avi@redhat.com>
virt/kvm/kvm_main.c
patch
|
blob
|
history
diff --git
a/virt/kvm/kvm_main.c
b/virt/kvm/kvm_main.c
index
5f865ed
..
e211945
100644
(file)
--- a/
virt/kvm/kvm_main.c
+++ b/
virt/kvm/kvm_main.c
@@
-1087,8
+1087,7
@@
int __kvm_set_memory_region(struct kvm *kvm,
int r;
gfn_t base_gfn;
unsigned long npages, ugfn;
- int largepages;
- unsigned long i;
+ unsigned long largepages, i;
struct kvm_memory_slot *memslot;
struct kvm_memory_slot old, new;