tile/ptrace: Preserve previous registers for short regset write
authorDave Martin <Dave.Martin@arm.com>
Fri, 6 Jan 2017 17:54:51 +0000 (17:54 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2017 07:33:02 +0000 (08:33 +0100)
commite4be4d4942b92cdd2d3e87ed178269bcd5844526
treeb25992874ba4c811cab42929dd964ab95a50d2b2
parent544160b6ea18670196d1173c099f2cced5075132
tile/ptrace: Preserve previous registers for short regset write

commit fd7c99142d77dc4a851879a66715abf12a3193fb 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: Chris Metcalf <cmetcalf@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/tile/kernel/ptrace.c