mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
sparc/ptrace: Preserve previous registers for short regset write
commit d3805c546b 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c869366685
commit
962b95a885
@@ -311,7 +311,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,
|
||||
|
||||
Reference in New Issue
Block a user