diff options
author | Alex Smith <alex@alex-smith.me.uk> | 2014-07-23 17:40:06 +0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-07-31 01:27:03 +0400 |
commit | 656ff9bef08c19a6471b49528dacb4cbbeb1e537 (patch) | |
tree | 0c2072970ccd0bbe36a7a80f135deae6ae6cd12a /arch/mips/kernel/ptrace32.c | |
parent | 6ee1d93455384cef8a0426effe85da241b525b63 (diff) | |
download | linux-656ff9bef08c19a6471b49528dacb4cbbeb1e537.tar.xz |
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>
Diffstat (limited to 'arch/mips/kernel/ptrace32.c')
-rw-r--r-- | arch/mips/kernel/ptrace32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kernel/ptrace32.c b/arch/mips/kernel/ptrace32.c index b40c3ca60ee5..a83fb730b387 100644 --- a/arch/mips/kernel/ptrace32.c +++ b/arch/mips/kernel/ptrace32.c @@ -129,7 +129,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, break; case FPC_EIR: /* implementation / version register */ - tmp = current_cpu_data.fpu_id; + tmp = boot_cpu_data.fpu_id; break; case DSP_BASE ... DSP_BASE + 5: { dspreg_t *dregs; |