aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/ptrace.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-04-09 22:39:25 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-09 22:39:25 -0400
commitd786a4a6599740eaa4b8d1e1d466853f02db11d4 (patch)
tree98157e4dc5c6b246ac56d95a6a16baccd86b6df7 /arch/sparc/kernel/ptrace.c
parentad4f95764040077f16ebf24559d5a06f8fb133bc (diff)
[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 <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/ptrace.c')
-rw-r--r--arch/sparc/kernel/ptrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c
index 5b54f11f4e59..7f44ae69b29e 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)
325 const struct user_regset_view *view; 325 const struct user_regset_view *view;
326 int ret; 326 int ret;
327 327
328 view = task_user_regset_view(child); 328 view = task_user_regset_view(current);
329 329
330 switch(request) { 330 switch(request) {
331 case PTRACE_GETREGS: { 331 case PTRACE_GETREGS: {