diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 369f485f4b7118a89c4af135ed1d28a3c90d0bd7..223b093c9440933f46fb2aa4cbc83729be1e6f57 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -233,7 +233,8 @@ void release_thread(struct task_struct *dead_task) int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) { - fpsimd_preserve_current_state(); + if (current->mm) + fpsimd_preserve_current_state(); *dst = *src; return 0; }