mips/ptrace: Preserve previous registers for short regset write
authorDave Martin <Dave.Martin@arm.com>
Mon, 27 Mar 2017 14:10:58 +0000 (15:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 Mar 2017 08:31:46 +0000 (10:31 +0200)
commit0ba34c87f7ce04232295ebf4991cd3ff36ea5abd
tree2e0912f099dbb69fcfcf3b489bf765de83a9e22d
parent616fe993f410c589cd928dfb015ccaf9c931dcc1
mips/ptrace: Preserve previous registers for short regset write

commit d614fd58a2834cfe4efa472c33c8f3ce2338b09b 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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/kernel/ptrace.c