KVM: Prevent overflow in largepages calculation
authorAvi Kivity <avi@redhat.com>
Mon, 8 Jun 2009 12:55:21 +0000 (15:55 +0300)
committerAvi Kivity <avi@redhat.com>
Wed, 10 Jun 2009 12:18:16 +0000 (15:18 +0300)
commit09f8ca74ae6c2d78b2c7f6c0751ed0cbe815a3d9
treefb45101cca1b35798c61fecfc28f590f071f755b
parentac04527f7947020c5890090b2ac87af4e98d977e
KVM: Prevent overflow in largepages calculation

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