[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1393475977-3381-2-git-send-email-n-horiguchi@ah.jp.nec.com>
Date: Wed, 26 Feb 2014 23:39:35 -0500
From: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
To: Sasha Levin <sasha.levin@...cle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/3] mm/pagewalk.c: fix end address calculation in walk_page_range()
When we try to walk over inside a vma, walk_page_range() tries to walk
until vma->vm_end even if a given end is before that point.
So this patch takes the smaller one as an end address.
Signed-off-by: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
---
mm/pagewalk.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git next-20140220.orig/mm/pagewalk.c next-20140220/mm/pagewalk.c
index 416e981243b1..b418407ff4da 100644
--- next-20140220.orig/mm/pagewalk.c
+++ next-20140220/mm/pagewalk.c
@@ -321,8 +321,9 @@ int walk_page_range(unsigned long start, unsigned long end,
next = vma->vm_start;
} else { /* inside the found vma */
walk->vma = vma;
- next = vma->vm_end;
- err = walk_page_test(start, end, walk);
+ next = min_t(unsigned long, end, vma->vm_end);
+
+ err = walk_page_test(start, next, walk);
if (skip_lower_level_walking(walk))
continue;
if (err)
--
1.8.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists