aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Schaefer <gerald.schaefer@de.ibm.com>2012-11-08 12:50:08 +0100
committerEric B Munson <emunson@mgebm.net>2012-11-08 08:16:08 -0500
commit5c683bbc8578eb140852702494f63401380a3e00 (patch)
tree9948a833cf400c55a59d4985ce2e8e50e924f4b6
parentc612274431bb20298e7c13dc9bd7bb758c432ec9 (diff)
downloadlibhugetlbfs-5c683bbc8578eb140852702494f63401380a3e00.tar.gz
Fix WARNING: Unable to verify address range
This patch fixes a warning about an empty address range that will be issued when the offset in prepare_segment() is smaller than page_size. In that case, check_range_empty() would be called with len == 0 (the page_size down-aligned offset), triggering the warning. This is fixed by checking the down-aligned offset instead of the offset itself before calling check_range_empty(). Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Eric B Munson <emunson@mgebm.net>
-rw-r--r--elflink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/elflink.c b/elflink.c
index e92d2dd..b746b26 100644
--- a/elflink.c
+++ b/elflink.c
@@ -872,7 +872,7 @@ static int prepare_segment(struct seg_info *seg)
*/
end = (void *) ALIGN((unsigned long)seg->vaddr + seg->memsz, page_size);
new_end = (void *) ALIGN((unsigned long)end, hpage_size);
- if (offset)
+ if (ALIGN_DOWN(offset, page_size))
check_range_empty(start, ALIGN_DOWN(offset, page_size));
if (end != new_end)
check_range_empty(end, new_end - end);