diff options
| -rw-r--r-- | arch/arm64/kernel/process.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 885c1adcf54c..3bb7f65bf7b7 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -344,7 +344,14 @@ void arch_release_task_struct(struct task_struct *tsk) int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) { - fpsimd_preserve_current_state(); + /* + * The current/src task's FPSIMD state may or may not be live, and may + * have been altered by ptrace after entry to the kernel. Save the + * effective FPSIMD state so that this will be copied into dst. + */ + fpsimd_save_and_flush_current_state(); + fpsimd_sync_from_effective_state(src); + *dst = *src; /* |
