Re: [PATCH 4/4] x86/fpu: don't abuse drop_init_fpu() in flush_thread()

Oleg Nesterov
2015-03-16T14:42:05Z

On 03/16, Borislav Petkov wrote:
>
> -static inline void drop_init_fpu(struct task_struct *tsk)
> +/*
> + * Reset the FPU state in the eager case and drop it in the lazy case (later use
> + * will reinit it).
> + */
> +static inline void fpu_reset_state(struct task_struct *tsk)

ACK!

Perhaps you can also find a beter name for __save_init_fpu/etc ;) The
name clearly suggests that it does "save + init" while in fact it does
"save and may be destroy FPU state". At least for the callers, the fact
that "destroy" is actually "init" doesn't really matter.

But lets not rename it right now. This can conflict with the fixes we
need to do first.

Oleg.