summaryrefslogtreecommitdiff
path: root/arch/m32r/kernel/process.c
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2016-02-01 13:50:36 +0000
committerGreg Kroah-Hartman <gregkh@google.com>2018-02-05 08:58:29 -0800
commit1e9d84070a8c2c3dc4002807611a20a353868267 (patch)
tree40e8f828fd328c4b6893021306cecb961819ccce /arch/m32r/kernel/process.c
parentcb7c7f371ea5922f1efea469afe2475c4b039d8f (diff)
UPSTREAM: MIPS: Properly disable FPU in start_thread()
start_thread() (called for execve(2)) clears the TIF_USEDFPU flag without atomically disabling the FPU. With a preemptive kernel, an unfortunately timed preemption after this could result in another task (or KVM guest) being scheduled in with the FPU still enabled, since lose_fpu_inatomic() only turns it off if TIF_USEDFPU is set. Use lose_fpu(0) instead of the separate FPU / MSA management, which should do the right thing (drop FPU properly and atomically without saving state) and will be more future proof. Signed-off-by: James Hogan <james.hogan@imgtec.com> Reviewed-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12302/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> (cherry picked from commit 76e5846d3bdf59eb1010d5607003da2dc3910bb1) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'arch/m32r/kernel/process.c')
0 files changed, 0 insertions, 0 deletions