aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin')
-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 7e1f762b6700..140bf00e9974 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,
160 struct vm_list_struct *vml; 160 struct vm_list_struct *vml;
161 struct sram_list_struct *sraml; 161 struct sram_list_struct *sraml;
162 162
163 /* overflow */
164 if (start + len < start)
165 return -EIO;
166
163 for (vml = child->mm->context.vmlist; vml; vml = vml->next) 167 for (vml = child->mm->context.vmlist; vml; vml = vml->next)
164 if (start >= vml->vma->vm_start && start + len < vml->vma->vm_end) 168 if (start >= vml->vma->vm_start && start + len < vml->vma->vm_end)
165 return 0; 169 return 0;