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

From: Oleg Nesterov
Date: Mon Mar 16 2015 - 10:42:08 EST


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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/