In PTRACE_GET/SETVSRREGS, we should be using the thread we are
ptracing rather than current.  

Signed-off-by: Michael Neuling <[EMAIL PROTECTED]>
---

 arch/powerpc/kernel/ptrace.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6-ozlabs/arch/powerpc/kernel/ptrace.c
===================================================================
--- linux-2.6-ozlabs.orig/arch/powerpc/kernel/ptrace.c
+++ linux-2.6-ozlabs/arch/powerpc/kernel/ptrace.c
@@ -374,7 +374,7 @@ static int vsr_get(struct task_struct *t
        flush_vsx_to_thread(target);
 
        for (i = 0; i < 32 ; i++)
-               buf[i] = current->thread.fpr[i][TS_VSRLOWOFFSET];
+               buf[i] = target->thread.fpr[i][TS_VSRLOWOFFSET];
        ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
                                  buf, 0, 32 * sizeof(double));
 
@@ -393,7 +393,7 @@ static int vsr_set(struct task_struct *t
        ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
                                 buf, 0, 32 * sizeof(double));
        for (i = 0; i < 32 ; i++)
-               current->thread.fpr[i][TS_VSRLOWOFFSET] = buf[i];
+               target->thread.fpr[i][TS_VSRLOWOFFSET] = buf[i];
 
 
        return ret;
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to