* [PATCH] FRV: Fix error handling in is_user_addr_valid()
@ 2008-11-21 16:07 David Howells
2008-11-21 16:09 ` David Howells
0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2008-11-21 16:07 UTC (permalink / raw)
To: torvalds, akpm; +Cc: dhowells, linux-kernel
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-21 16:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-21 16:07 [PATCH] FRV: Fix error handling in is_user_addr_valid() David Howells
2008-11-21 16:09 ` David Howells
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox