diff options
Diffstat (limited to 'arch/frv/kernel/ptrace.c')
-rw-r--r-- | arch/frv/kernel/ptrace.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/frv/kernel/ptrace.c b/arch/frv/kernel/ptrace.c index 709e9bdc6126..5e7d401d21e7 100644 --- a/arch/frv/kernel/ptrace.c +++ b/arch/frv/kernel/ptrace.c | |||
@@ -69,7 +69,8 @@ static inline int put_reg(struct task_struct *task, int regno, | |||
69 | } | 69 | } |
70 | 70 | ||
71 | /* | 71 | /* |
72 | * check that an address falls within the bounds of the target process's memory mappings | 72 | * check that an address falls within the bounds of the target process's memory |
73 | * mappings | ||
73 | */ | 74 | */ |
74 | static inline int is_user_addr_valid(struct task_struct *child, | 75 | static inline int is_user_addr_valid(struct task_struct *child, |
75 | unsigned long start, unsigned long len) | 76 | unsigned long start, unsigned long len) |
@@ -79,11 +80,11 @@ static inline int is_user_addr_valid(struct task_struct *child, | |||
79 | return -EIO; | 80 | return -EIO; |
80 | return 0; | 81 | return 0; |
81 | #else | 82 | #else |
82 | struct vm_list_struct *vml; | 83 | struct vm_area_struct *vma; |
83 | 84 | ||
84 | for (vml = child->mm->context.vmlist; vml; vml = vml->next) | 85 | vma = find_vma(child->mm, start); |
85 | if (start >= vml->vma->vm_start && start + len <= vml->vma->vm_end) | 86 | if (vma && start >= vma->vm_start && start + len <= vma->vm_end) |
86 | return 0; | 87 | return 0; |
87 | 88 | ||
88 | return -EIO; | 89 | return -EIO; |
89 | #endif | 90 | #endif |