projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d207a8c
)
Blackfin arch: have is_user_addr_valid() check for overflows (like when address is -1)
author
Mike Frysinger
<vapier.adi@gmail.com>
Fri, 10 Oct 2008 09:12:51 +0000
(17:12 +0800)
committer
Bryan Wu
<cooloney@kernel.org>
Fri, 10 Oct 2008 09:12:51 +0000
(17:12 +0800)
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
arch/blackfin/kernel/ptrace.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/blackfin/kernel/ptrace.c
b/arch/blackfin/kernel/ptrace.c
index 7e1f762b670052c961e47c31f78f719e96b6c973..140bf00e99749f6fee7e9aec85149f9872c1d03f 100644
(file)
--- a/
arch/blackfin/kernel/ptrace.c
+++ b/
arch/blackfin/kernel/ptrace.c
@@
-160,6
+160,10
@@
static inline int is_user_addr_valid(struct task_struct *child,
struct vm_list_struct *vml;
struct sram_list_struct *sraml;
+ /* overflow */
+ if (start + len < start)
+ return -EIO;
+
for (vml = child->mm->context.vmlist; vml; vml = vml->next)
if (start >= vml->vma->vm_start && start + len < vml->vma->vm_end)
return 0;