MIPS: ptrace: Avoid smp_processor_id() when retrieving FPU IR
authorAlex Smith <alex@alex-smith.me.uk>
Wed, 23 Jul 2014 13:40:06 +0000 (14:40 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 30 Jul 2014 21:27:03 +0000 (23:27 +0200)
commit656ff9bef08c19a6471b49528dacb4cbbeb1e537
tree0c2072970ccd0bbe36a7a80f135deae6ae6cd12a
parent6ee1d93455384cef8a0426effe85da241b525b63
MIPS: ptrace: Avoid smp_processor_id() when retrieving FPU IR

Whenever ptrace attempts to retrieve the FPU implementation register it
accesses it through current_cpu_data, which calls smp_processor_id().
Since the code may execute with preemption enabled, this can trigger
a warning. Fix this by using boot_cpu_data to get the IR instead.

Signed-off-by: Alex Smith <alex@alex-smith.me.uk>
Cc: <stable@vger.kernel.org> # v3.15+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7449/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/ptrace.c
arch/mips/kernel/ptrace32.c