MIPS: Disable preemption during prctl(PR_SET_FP_MODE, ...)
authorPaul Burton <paul.burton@imgtec.com>
Thu, 21 Apr 2016 11:43:57 +0000 (12:43 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 6 Jun 2016 23:12:21 +0000 (19:12 -0400)
commitdaf7322babd9946b7c2e2eae53d1f68f7665766b
treed3ec79a948a26a7687697c2606e287e07d84b466
parent49dc90fd14c0ce2ec494d44f1cd6594603d7c4a0
MIPS: Disable preemption during prctl(PR_SET_FP_MODE, ...)

[ Upstream commit bd239f1e1429e7781096bf3884bdb1b2b1bb4f28 ]

Whilst a PR_SET_FP_MODE prctl is performed there are decisions made
based upon whether the task is executing on the current CPU. This may
change if we're preempted, so disable preemption to avoid such changes
for the lifetime of the mode switch.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Fixes: 9791554b45a2 ("MIPS,prctl: add PR_[GS]ET_FP_MODE prctl options for MIPS")
Reviewed-by: Maciej W. Rozycki <macro@imgtec.com>
Tested-by: Aurelien Jarno <aurelien@aurel32.net>
Cc: Adam Buchbinder <adam.buchbinder@gmail.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: stable <stable@vger.kernel.org> # v4.0+
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/13144/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
arch/mips/kernel/process.c