aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/kernel/ptrace.c')
-rw-r--r--arch/blackfin/kernel/ptrace.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c
index 4de44f387dd5..d5e6be2d5ed8 100644
--- a/arch/blackfin/kernel/ptrace.c
+++ b/arch/blackfin/kernel/ptrace.c
@@ -80,10 +80,12 @@ static inline struct pt_regs *get_user_regs(struct task_struct *task)
80/* 80/*
81 * Get all user integer registers. 81 * Get all user integer registers.
82 */ 82 */
83static inline int ptrace_getregs(struct task_struct *tsk, void __user * uregs) 83static inline int ptrace_getregs(struct task_struct *tsk, void __user *uregs)
84{ 84{
85 struct pt_regs *regs = get_user_regs(tsk); 85 struct pt_regs regs;
86 return copy_to_user(uregs, regs, sizeof(struct pt_regs)) ? -EFAULT : 0; 86 memcpy(&regs, get_user_regs(tsk), sizeof(regs));
87 regs.usp = tsk->thread.usp;
88 return copy_to_user(uregs, &regs, sizeof(struct pt_regs)) ? -EFAULT : 0;
87} 89}
88 90
89/* Mapping from PT_xxx to the stack offset at which the register is 91/* Mapping from PT_xxx to the stack offset at which the register is