diff options
Diffstat (limited to 'arch/blackfin/kernel/ptrace.c')
-rw-r--r-- | arch/blackfin/kernel/ptrace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c index d2d38853663..594e325b40e 100644 --- a/arch/blackfin/kernel/ptrace.c +++ b/arch/blackfin/kernel/ptrace.c | |||
@@ -160,15 +160,15 @@ put_reg(struct task_struct *task, int regno, unsigned long data) | |||
160 | static inline int is_user_addr_valid(struct task_struct *child, | 160 | static inline int is_user_addr_valid(struct task_struct *child, |
161 | unsigned long start, unsigned long len) | 161 | unsigned long start, unsigned long len) |
162 | { | 162 | { |
163 | struct vm_list_struct *vml; | 163 | struct vm_area_struct *vma; |
164 | struct sram_list_struct *sraml; | 164 | struct sram_list_struct *sraml; |
165 | 165 | ||
166 | /* overflow */ | 166 | /* overflow */ |
167 | if (start + len < start) | 167 | if (start + len < start) |
168 | return -EIO; | 168 | return -EIO; |
169 | 169 | ||
170 | for (vml = child->mm->context.vmlist; vml; vml = vml->next) | 170 | vma = find_vma(child->mm, start); |
171 | if (start >= vml->vma->vm_start && start + len < vml->vma->vm_end) | 171 | if (vma && start >= vma->vm_start && start + len <= vma->vm_end) |
172 | return 0; | 172 | return 0; |
173 | 173 | ||
174 | for (sraml = child->mm->context.sram_list; sraml; sraml = sraml->next) | 174 | for (sraml = child->mm->context.sram_list; sraml; sraml = sraml->next) |