summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@imgtec.com>2016-10-28 10:20:09 +0300
committerRalf Baechle <ralf@linux-mips.org>2016-11-04 03:28:17 +0300
commitc9e5603974573367c4d80964a845237a2297228c (patch)
tree5971837f1b4c7c2e5fe92a3bb7c7c50f98822cee /arch
parent8a98495c7008d5bdede3d53e05e69ecdc0bc614b (diff)
downloadlinux-c9e5603974573367c4d80964a845237a2297228c.tar.xz
MIPS: ptrace: Also initialize the FP context on individual FCSR writes
Complement commit ac9ad83bc318 ("MIPS: prevent FP context set via ptrace being discarded") and also initialize the FP context whenever FCSR alone is written with a PTRACE_POKEUSR request addressing FPC_CSR, rather than along with the full FPU register set in the case of the PTRACE_SETFPREGS request. Signed-off-by: Maciej W. Rozycki <macro@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14459/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/kernel/ptrace.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index 6103b24d1bfc..fd3a9580661a 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -817,6 +817,7 @@ long arch_ptrace(struct task_struct *child, long request,
break;
#endif
case FPC_CSR:
+ init_fp_ctx(child);
ptrace_setfcr31(child, data);
break;
case DSP_BASE ... DSP_BASE + 5: {