When checking that a region of address space is empty, keep in mind that the segment vaddr may not be page-aligned. This patch fixes spurious warnings with RW-style remapping.
Signed-off-by: Adam Litke <[EMAIL PROTECTED]> --- elflink.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/elflink.c b/elflink.c index 2816f8f..c1761fc 100644 --- a/elflink.c +++ b/elflink.c @@ -821,7 +821,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) - check_range_empty(start, offset); + check_range_empty(start, ALIGN_DOWN(offset, page_size)); if (end != new_end) check_range_empty(end, new_end - end); ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel