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:
e922c4c
)
mm: nommu: check the vma list when unmapping file-mapped vma
author
Namhyung Kim
<
[email protected]
>
Wed, 25 May 2011 00:11:25 +0000
(17:11 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 25 May 2011 15:39:06 +0000
(08:39 -0700)
Now we have the sorted vma list, use it in do_munmap() to check that we
have an exact match.
Signed-off-by: Namhyung Kim <
[email protected]
>
Acked-by: Greg Ungerer <
[email protected]
>
Cc: David Howells <
[email protected]
>
Cc: Paul Mundt <
[email protected]
>
Cc: Geert Uytterhoeven <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/nommu.c
patch
|
blob
|
history
diff --git
a/mm/nommu.c
b/mm/nommu.c
index e5318f8efde5889174187953846418dbc2d0993a..0563fd9003df86b0c8c39844341bfc1847d4dba7 100644
(file)
--- a/
mm/nommu.c
+++ b/
mm/nommu.c
@@
-1635,7
+1635,6
@@
static int shrink_vma(struct mm_struct *mm,
int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
{
struct vm_area_struct *vma;
- struct rb_node *rb;
unsigned long end = start + len;
int ret;
@@
-1668,9
+1667,8
@@
int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
}
if (end == vma->vm_end)
goto erase_whole_vma;
- rb = rb_next(&vma->vm_rb);
- vma = rb_entry(rb, struct vm_area_struct, vm_rb);
- } while (rb);
+ vma = vma->vm_next;
+ } while (vma);
kleave(" = -EINVAL [split file]");
return -EINVAL;
} else {