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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 29 Mar 2017 15:54:17 +0000 (08:54 -0700)
commit5fe81fe98123ce41265c65e95d34418d30d005d1
tree954670ad1295ea964db35e4af2449179d7364245
parenta78ce80d2c9178351b34d78fec805140c29c193e
metag/ptrace: Provide default TXSTATUS for short NT_PRSTATUS

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>
arch/metag/kernel/ptrace.c