metag/ptrace: Provide default TXSTATUS for short NT_PRSTATUS
authorDave Martin <Dave.Martin@arm.com>
Mon, 27 Mar 2017 14:10:56 +0000 (15:10 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Jun 2017 12:04:38 +0000 (14:04 +0200)
commit137b9e272f4c4f93a7681c20b109663b45e22ada
treed4b7e6505db279a7aeea21c6314b0cd09f6a8ee7
parent1dc7c2d250c5d5900b9d3f40b2e6b2dc99bf0f63
metag/ptrace: Provide default TXSTATUS for short NT_PRSTATUS

commit 5fe81fe98123ce41265c65e95d34418d30d005d1 upstream.

Ensure that if userspace supplies insufficient data to PTRACE_SETREGSET
to fill TXSTATUS, a well-defined default value is used, based on the
task's current value.

Suggested-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
arch/metag/kernel/ptrace.c