arm64/ptrace: Flush FP state when setting ZT0
[platform/kernel/linux-starfive.git] / arch / arm64 / kernel / ptrace.c
index d7f4f0d..740e81e 100644 (file)
@@ -1180,6 +1180,8 @@ static int zt_set(struct task_struct *target,
        if (ret == 0)
                target->thread.svcr |= SVCR_ZA_MASK;
 
+       fpsimd_flush_task_state(target);
+
        return ret;
 }