aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc
diff options
context:
space:
mode:
authorDave Martin <Dave.Martin@arm.com>2017-03-27 15:10:59 +0100
committerMister Oyster <oysterized@gmail.com>2017-07-04 12:11:11 +0200
commit4730ff4ab196c63d94aff3de05c75c1759ca5aa3 (patch)
treec95897cfab23d0c98d580b22f99f552bbd8791bc /arch/sparc
parent49c415f163d3c3e32852d131199e036d8a18f568 (diff)
sparc/ptrace: Preserve previous registers for short regset write
commit d3805c546b275c8cc7d40f759d029ae92c7175f2 upstream. Ensure that if userspace supplies insufficient data to PTRACE_SETREGSET to fill all the registers, the thread's old registers are preserved. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/ptrace_64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c
index 7ff45e4ba..875ddf00d 100644
--- a/arch/sparc/kernel/ptrace_64.c
+++ b/arch/sparc/kernel/ptrace_64.c
@@ -308,7 +308,7 @@ static int genregs64_set(struct task_struct *target,
}
if (!ret) {
- unsigned long y;
+ unsigned long y = regs->y;
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
&y,