Skip to content

Commit eaa4770

Browse files
committed
sh: Use boot_cpu_data for FPU tests in sigcontext paths.
We do not want to use smp_processor_id() from these paths, as they trip preempt BUGs. Switch the test over to the boot cpu directly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent 9922262 commit eaa4770

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎arch/sh/kernel/signal_32.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static inline int restore_sigcontext_fpu(struct sigcontext __user *sc)
145145
{
146146
struct task_struct *tsk = current;
147147

148-
if (!(current_cpu_data.flags & CPU_HAS_FPU))
148+
if (!(boot_cpu_data.flags & CPU_HAS_FPU))
149149
return 0;
150150

151151
set_used_math();
@@ -158,7 +158,7 @@ static inline int save_sigcontext_fpu(struct sigcontext __user *sc,
158158
{
159159
struct task_struct *tsk = current;
160160

161-
if (!(current_cpu_data.flags & CPU_HAS_FPU))
161+
if (!(boot_cpu_data.flags & CPU_HAS_FPU))
162162
return 0;
163163

164164
if (!used_math()) {
@@ -199,7 +199,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *r0_p
199199
#undef COPY
200200

201201
#ifdef CONFIG_SH_FPU
202-
if (current_cpu_data.flags & CPU_HAS_FPU) {
202+
if (boot_cpu_data.flags & CPU_HAS_FPU) {
203203
int owned_fp;
204204
struct task_struct *tsk = current;
205205

0 commit comments

Comments
 (0)