|
|
9ae3a8 |
From 3dfe8a98ffab1c5194818f623f4bcf80d49f3a07 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Marcelo Tosatti <mtosatti@redhat.com>
|
|
|
9ae3a8 |
Date: Mon, 24 Feb 2014 14:59:16 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 1/7] mempath prefault: fix off-by-one error
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Marcelo Tosatti <mtosatti@redhat.com>
|
|
|
9ae3a8 |
Message-id: <20140224145916.GA9047@amt.cnet>
|
|
|
9ae3a8 |
Patchwork-id: 57767
|
|
|
9ae3a8 |
O-Subject: [RHEL7 qemu-kvm PATCH] mempath prefault: fix off-by-one error
|
|
|
9ae3a8 |
Bugzilla: 1069039
|
|
|
9ae3a8 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Radim Krcmar <rkrcmar@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Andrea Arcangeli <aarcange@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
commit 2ba82852894c762299b7d05e9a2be184116b80f0 of uq/master branch
|
|
|
9ae3a8 |
of qemu-kvm.git
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Fix off-by-one error (noticed by Andrea Arcangeli).
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
|
9ae3a8 |
BZ: 1069039
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
exec.c | 2 +-
|
|
|
9ae3a8 |
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/exec.c b/exec.c
|
|
|
9ae3a8 |
index 6fe2fe7..b7d9e1a 100644
|
|
|
9ae3a8 |
--- a/exec.c
|
|
|
9ae3a8 |
+++ b/exec.c
|
|
|
9ae3a8 |
@@ -980,7 +980,7 @@ static void *file_ram_alloc(RAMBlock *block,
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
/* MAP_POPULATE silently ignores failures */
|
|
|
9ae3a8 |
- for (i = 0; i < (memory/hpagesize)-1; i++) {
|
|
|
9ae3a8 |
+ for (i = 0; i < (memory/hpagesize); i++) {
|
|
|
9ae3a8 |
memset(area + (hpagesize*i), 0, 1);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|