]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: fix EVA & non-SMP non-FPU FP context signal handling
authorPaul Burton <paul.burton@imgtec.com>
Tue, 28 Oct 2014 11:25:51 +0000 (11:25 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 24 Nov 2014 06:44:06 +0000 (07:44 +0100)
commit91a8bdd53281b87eff19b3db9353667933e27eac
tree16f4abc106be0b59fcbf2920f366394c0d765f3f
parente311e50fa9989662b1f19d8d46184e58ab93710b
MIPS: fix EVA & non-SMP non-FPU FP context signal handling

The save_fp_context & restore_fp_context pointers were being assigned
to the wrong variables if either:

  - The kernel is configured for UP & runs on a system without an FPU,
    since 7a74eb71489c "MIPS: Move & rename
    fpu_emulator_{save,restore}_context".

  - The kernel is configured for EVA, since 5676d331db82 "MIPS: kernel:
    signal: Prevent save/restore FPU context in user memory".

This would lead to FP context being clobbered incorrectly when setting
up a sigcontext, then the garbage values being saved uselessly when
returning from the signal.

Fix by swapping the pointer assignments appropriately.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: stable@vger.kernel.org # v3.15+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8230/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/signal.c