[patch 10/83] sparc64: Fix bug in PTRACE_SETFPREGS64 handling.

Greg KH
2008-12-11T19:22:23Z

[-- Attachment #1: 0004-sparc64-Fix-bug-in-PTRACE_SETFPREGS64-handling.patch --]
[-- Type: text/plain, Size: 1026 bytes --]

2.6.27-stable review patch. If anyone has any objections, please let us know.

------------------

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

[ 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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/sparc64/kernel/ptrace.c
+++ b/arch/sparc64/kernel/ptrace.c
@@ -1014,7 +1014,7 @@ long arch_ptrace(struct task_struct *chi
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);