mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-06-16 02:15:47 +00:00
kvm tools: balloon: fix overflow in PFN to address conversion
Fix trivial overflow of u32 value Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
474b696f40
commit
c818344265
+1
-1
@@ -64,7 +64,7 @@ static bool virtio_bln_do_io_request(struct kvm *kvm, struct bln_dev *bdev, stru
|
||||
for (i = 0 ; i < len ; i++) {
|
||||
void *guest_ptr;
|
||||
|
||||
guest_ptr = guest_flat_to_host(kvm, ptrs[i] << VIRTIO_BALLOON_PFN_SHIFT);
|
||||
guest_ptr = guest_flat_to_host(kvm, (u64)ptrs[i] << VIRTIO_BALLOON_PFN_SHIFT);
|
||||
if (queue == &bdev->vqs[VIRTIO_BLN_INFLATE]) {
|
||||
madvise(guest_ptr, 1 << VIRTIO_BALLOON_PFN_SHIFT, MADV_DONTNEED);
|
||||
bdev->config.actual++;
|
||||
|
||||
Reference in New Issue
Block a user