Messages in this thread Patch in this message | | | From | David Howells <> | Subject | [PATCH] FRV: Fix error handling in is_user_addr_valid() | Date | Fri, 21 Nov 2008 16:07:44 +0000 |
| |
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 <dhowells@redhat.com> ---
arch/frv/kernel/ptrace.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/frv/kernel/ptrace.c b/arch/frv/kernel/ptrace.c index e9af8de..5e7d401 100644 --- a/arch/frv/kernel/ptrace.c +++ b/arch/frv/kernel/ptrace.c @@ -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;
| |