summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/ptrace.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2008-10-10 17:12:51 +0800
committerBryan Wu <cooloney@kernel.org>2008-10-10 17:12:51 +0800
commit3c08f1d122627c9559fb03a11f52ea37f960b61e (patch)
tree1ad1ae12d18df4c8f92de734e26612abb05a6580 /arch/blackfin/kernel/ptrace.c
parentd207a8c7681f14302e9e80ef5b8202abe39060b5 (diff)
Blackfin arch: have is_user_addr_valid() check for overflows (like when address is -1)
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/kernel/ptrace.c')
-rw-r--r--arch/blackfin/kernel/ptrace.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c
index 7e1f762b670..140bf00e997 100644
--- 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;