From d786a4a6599740eaa4b8d1e1d466853f02db11d4 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Wed, 9 Apr 2008 19:39:25 -0700 Subject: [SPARC]: Fix several regset and ptrace bugs. 1) ptrace should pass 'current' to task_user_regset_view() 2) When fetching general registers using a 64-bit view, and the target is 32-bit, we have to convert. 3) Skip the whole register window get/set code block if the user isn't asking to access anything in there. Otherwise we have problems if the user doesn't have an address space setup. Fetching ptrace register is still valid at such a time, and ptrace does not try to access the register window area of the regset. Signed-off-by: David S. Miller --- arch/sparc/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/sparc') diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c index 5b54f11..7f44ae6 100644 --- a/arch/sparc/kernel/ptrace.c +++ b/arch/sparc/kernel/ptrace.c @@ -325,7 +325,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) const struct user_regset_view *view; int ret; - view = task_user_regset_view(child); + view = task_user_regset_view(current); switch(request) { case PTRACE_GETREGS: { -- cgit v1.1