projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45ebb84
)
pagewalk: fix walk_page_range() don't check find_vma() result properly
author
KOSAKI Motohiro
<
[email protected]
>
Tue, 26 Jul 2011 00:12:09 +0000
(17:12 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 26 Jul 2011 03:57:08 +0000
(20:57 -0700)
The doc of find_vma() says,
/* Look up the first VMA which satisfies addr < vm_end, NULL if none. */
struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
{
(snip)
Thus, caller should confirm whether the returned vma matches a desired one.
Signed-off-by: KOSAKI Motohiro <
[email protected]
>
Cc: Naoya Horiguchi <
[email protected]
>
Cc: Hiroyuki Kamezawa <
[email protected]
>
Cc: Andrea Arcangeli <
[email protected]
>
Cc: Matt Mackall <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/pagewalk.c
patch
|
blob
|
history
diff --git
a/mm/pagewalk.c
b/mm/pagewalk.c
index c3450d5336111830ad0b572efc08000006de13bd..606bbb4125d046bfb8b50019790d327c564ebc14 100644
(file)
--- a/
mm/pagewalk.c
+++ b/
mm/pagewalk.c
@@
-176,7
+176,7
@@
int walk_page_range(unsigned long addr, unsigned long end,
* we can't handled it in the same manner as non-huge pages.
*/
vma = find_vma(walk->mm, addr);
- if (vma && is_vm_hugetlb_page(vma)) {
+ if (vma &&
vma->vm_start <= addr &&
is_vm_hugetlb_page(vma)) {
if (vma->vm_end < next)
next = vma->vm_end;
/*