aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@evo.osdl.org>2005-01-07 20:07:50 -0800
committerLinus Torvalds <torvalds@evo.osdl.org>2005-01-07 20:07:50 -0800
commit1265755d4f2a5772bfb969f65463b1b6918de115 (patch)
tree8aa5fc415b67338308d7e9ddfd0be62996a6b99d /mm
parent714d25d258540c2d9b61a65cbaa4e17905189239 (diff)
downloadhistory-1265755d4f2a5772bfb969f65463b1b6918de115.tar.gz
Fix TASK_SIZE range check that got lost in recent
clear_page_range()/4-level page table updates.
Diffstat (limited to 'mm')
-rw-r--r--mm/mmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index 25348d68fcb9fe..98ae4fcd2e0019 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1484,6 +1484,9 @@ static void free_pgtables(struct mmu_gather *tlb, struct vm_area_struct *prev,
unsigned long last = end + PGDIR_SIZE - 1;
struct mm_struct *mm = tlb->mm;
+ if (last > TASK_SIZE || last < end)
+ last = TASK_SIZE;
+
if (!prev) {
prev = mm->mmap;
if (!prev)