aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-06-25 17:54:33 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:24:26 -0400
commit2d15cab85b85a56cc886037cab43cc292923ff22 (patch)
tree55de7526dfb766067821d552892ad43b32f78c35
parent1e8a81c5a37907bc082025d3468718116dca1eeb (diff)
[PATCH] mm: 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: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--mm/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c
index c256175742ac..beabdefa6254 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1139,7 +1139,7 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
1139{ 1139{
1140 pgd_t *pgd; 1140 pgd_t *pgd;
1141 unsigned long next; 1141 unsigned long next;
1142 unsigned long end = addr + size; 1142 unsigned long end = addr + PAGE_ALIGN(size);
1143 struct mm_struct *mm = vma->vm_mm; 1143 struct mm_struct *mm = vma->vm_mm;
1144 int err; 1144 int err;
1145 1145