diff options
| -rw-r--r-- | arch/arm64/kernel/process.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index b2adcce7bc18..6b7dcf4310ac 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c | |||
| @@ -314,6 +314,15 @@ int copy_thread(unsigned long clone_flags, unsigned long stack_start, | |||
| 314 | clear_tsk_thread_flag(p, TIF_SVE); | 314 | clear_tsk_thread_flag(p, TIF_SVE); |
| 315 | p->thread.sve_state = NULL; | 315 | p->thread.sve_state = NULL; |
| 316 | 316 | ||
| 317 | /* | ||
| 318 | * In case p was allocated the same task_struct pointer as some | ||
| 319 | * other recently-exited task, make sure p is disassociated from | ||
| 320 | * any cpu that may have run that now-exited task recently. | ||
| 321 | * Otherwise we could erroneously skip reloading the FPSIMD | ||
| 322 | * registers for p. | ||
| 323 | */ | ||
| 324 | fpsimd_flush_task_state(p); | ||
| 325 | |||
| 317 | if (likely(!(p->flags & PF_KTHREAD))) { | 326 | if (likely(!(p->flags & PF_KTHREAD))) { |
| 318 | *childregs = *current_pt_regs(); | 327 | *childregs = *current_pt_regs(); |
| 319 | childregs->regs[0] = 0; | 328 | childregs->regs[0] = 0; |
