OSDN Git Service

metag/ptrace: Preserve previous registers for short regset write
authorDave Martin <Dave.Martin@arm.com>
Mon, 27 Mar 2017 14:10:55 +0000 (15:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 Mar 2017 07:49:54 +0000 (09:49 +0200)
commit2d9bc3695012f1ef7465f56302c1e60c48dccde8
treee46df8222b82a96bc6e8c10d4112b463545a5e72
parent962b95a88574359b081e24815fae6aba92fff98d
metag/ptrace: Preserve previous registers for short regset write

commit a78ce80d2c9178351b34d78fec805140c29c193e 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: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/metag/kernel/ptrace.c