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:
e2b297f
)
uprobes: Valid_vma() should reject VM_HUGETLB
author
Oleg Nesterov
<
[email protected]
>
Fri, 15 Jun 2012 15:43:22 +0000
(17:43 +0200)
committer
Ingo Molnar
<
[email protected]
>
Sat, 16 Jun 2012 07:10:41 +0000
(09:10 +0200)
__replace_page() obviously can't work with the hugetlbfs
mappings, uprobe_register() will likely crash the kernel. Change
valid_vma() to check VM_HUGETLB as well.
As for PageTransHuge() no need to worry, vma->vm_file != NULL.
Signed-off-by: Oleg Nesterov <
[email protected]
>
Acked-by: Srikar Dronamraju <
[email protected]
>
Cc: Ananth N Mavinakayanahalli <
[email protected]
>
Cc: Anton Arapov <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Ingo Molnar <
[email protected]
>
kernel/events/uprobes.c
patch
|
blob
|
history
diff --git
a/kernel/events/uprobes.c
b/kernel/events/uprobes.c
index b52376d023327211f313da30c292d89cfd211baa..f0d04530af632f0fad0575d35204d9096600110a 100644
(file)
--- a/
kernel/events/uprobes.c
+++ b/
kernel/events/uprobes.c
@@
-99,7
+99,8
@@
static bool valid_vma(struct vm_area_struct *vma, bool is_register)
if (!is_register)
return true;
- if ((vma->vm_flags & (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)) == (VM_READ|VM_EXEC))
+ if ((vma->vm_flags & (VM_HUGETLB|VM_READ|VM_WRITE|VM_EXEC|VM_SHARED))
+ == (VM_READ|VM_EXEC))
return true;
return false;