Two more cleanups from Oleg.
x86/fpu: factor out memset(xstate, 0) in fpu_finit() paths

fx_finit() has 2 users but only fpu_finit() needs to nullify xstate,
alloc_bootmem_align() in setup_init_fpu_buf() returns zero-filled

And note that both memset()'s look confusing. Yes, offsetof() is 0
for ->fxsave or ->fsave, but it would be more clean to turn them into
a single memset() which nullifies fpu->state.

Signed-off-by: Oleg Nesterov <>
Acked-by: Rik van Riel <>
Cc: Andy Lutomirski <>
Cc: Linus Torvalds <>
Cc: Tavis Ormandy <>
Cc: <>
Signed-off-by: Borislav Petkov <>
2 files changed