Commit 82cf1d4c authored by Dave Martin's avatar Dave Martin Committed by Greg Kroah-Hartman

sparc/ptrace: Preserve previous registers for short regset write

commit d3805c54 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: default avatarDave Martin <Dave.Martin@arm.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 54893ad8
...@@ -311,7 +311,7 @@ static int genregs64_set(struct task_struct *target, ...@@ -311,7 +311,7 @@ static int genregs64_set(struct task_struct *target,
} }
if (!ret) { if (!ret) {
unsigned long y; unsigned long y = regs->y;
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
&y, &y,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment