projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6bdf863
)
mempath prefault: fix off-by-one error
author
Marcelo Tosatti
<mtosatti@redhat.com>
Wed, 18 Dec 2013 18:42:17 +0000
(16:42 -0200)
committer
Marcelo Tosatti
<mtosatti@redhat.com>
Mon, 30 Dec 2013 21:05:11 +0000
(19:05 -0200)
Fix off-by-one error (noticed by Andrea Arcangeli).
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
exec.c
patch
|
blob
|
history
diff --git
a/exec.c
b/exec.c
index 896f7b83fc23fb116dd35059af148946c5bbc2ba..52d451b5474ae9503a6c02cda1f2ffd988dcb707 100644
(file)
--- a/
exec.c
+++ b/
exec.c
@@
-1001,7
+1001,7
@@
static void *file_ram_alloc(RAMBlock *block,
}
/* MAP_POPULATE silently ignores failures */
- for (i = 0; i < (memory/hpagesize)
-1
; i++) {
+ for (i = 0; i < (memory/hpagesize); i++) {
memset(area + (hpagesize*i), 0, 1);
}