diff options
author | Hugh Dickins <hugh@veritas.com> | 2005-06-22 14:02:41 +0100 |
---|---|---|
committer | Chris Wright <chrisw@osdl.org> | 2005-06-29 16:00:36 -0700 |
commit | 986bd4301425ab01934f8efe08ed9433b45492bb (patch) | |
tree | 7eead4f7035d20e1a2da6df987a75ee2451441a0 | |
parent | 906aa4d200854cf01f683195945f4618f8881e9a (diff) |
[PATCH] fix remap_pte_range BUG
Out-of-tree user of remap_pfn_range hit kernel BUG at mm/memory.c:1112!
It passes an unrounded size to remap_pfn_range, which was okay before
2.6.12, but misses remap_pte_range's new end condition. An audit of
all the other ptwalks confirms that this is the only one so exposed.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Chris Wright <chrisw@osdl.org>
-rw-r--r-- | mm/memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c index d209f745db7f..2f88f084fea5 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1164,7 +1164,7 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr, { pgd_t *pgd; unsigned long next; - unsigned long end = addr + size; + unsigned long end = addr + PAGE_ALIGN(size); struct mm_struct *mm = vma->vm_mm; int err; |