]> git.hungrycats.org Git - linux/commitdiff
sparc64: Fix bug in PTRACE_SETFPREGS64 handling.
authorChris Torek <chris.torek@windriver.com>
Wed, 3 Dec 2008 08:47:28 +0000 (00:47 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 13 Dec 2008 23:29:13 +0000 (15:29 -0800)
[ Upstream commit 5769907ade8dda7002b304c03ef9e4ee5c1e0821 ]

From: Chris Torek <chris.torek@windriver.com>

>The SPARC64 kernel code for PTRACE_SETFPREGS64 appears to be an exact copy
>of that for PTRACE_GETFPREGS64.  This means that gdbserver and native
>64-bit GDB cannot set floating-point registers.

It looks like a simple typo.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/sparc64/kernel/ptrace.c

index 10306e476e388370812cb5f1f03c32d9c61879ef..2df5b9b5260601a262d3f499db719c6b15e4a274 100644 (file)
@@ -1014,7 +1014,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                break;
 
        case PTRACE_SETFPREGS64:
-               ret = copy_regset_to_user(child, view, REGSET_FP,
+               ret = copy_regset_from_user(child, view, REGSET_FP,
                                          0 * sizeof(u64),
                                          33 * sizeof(u64),
                                          fps);