FRV: Fix error handling in is_user_addr_valid()
PATCH 1/1 FRV: Fix error handling in is_user_addr_valid()
Fix error handling in is_user_addr_valid() in NOMMU mode to check whether find_vma() actually worked or not. This checks whether ptrace() is allowed to access an address.
Signed-off-by David Howells <[email protected]>
---
arch/frv/kernel/ptrace.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/frv/kernel/ptrace.c +1 -1
@@ -83,7 +83,7 @@ static inline int is_user_addr_valid(struct task_struct *child,struct vm_area_struct *vma; vma =find_vma (child->mm, start); -if (start >= vma->vm_start && start + len <= vma->vm_end) +if (vma && start >= vma->vm_start && start + len <= vma->vm_end)return 0 ;return -EIO ;
Quoted 3 lines · David Howells
Fix error handling in
is_user_addr_valid()in NOMMU mode to check whetherfind_vma()actually worked or not. This checks whetherptrace()is allowed to access an address.
Ignore this patch, please. It's dependent on another patch you don't have yet.
David