Use this_cpu_read() instead this_cpu_read_stable() to avoid caching of
fpu_fpregs_owner_ctx during preemption points.
Fixes: 5f409e20b7945 ("x86/fpu: Defer FPU state load until return to userspace")
Or
a352a3b7b792 ("x86/fpu: Prepare copy_fpstate_to_sigframe() for TIF_NEED_FPU_LOAD")
maybe, which adds the fpregs_unlock() ?
Also I would like to add
Debugged-by: Ian Lance Taylor
Yes, pls. CCed.
--- Comment #2 from Austin Clements (austin@xxxxxxxxxx) ---
I can confirm that the patch posted by Sebastian Andrzej Siewior at
https://lkml.org/lkml/2019/11/27/304 fixes the issue both in our C reproducer
and in our original Go reproducer. (Sorry, I'm not subscribed to LKML, so I
can't reply there, and I'm on an airplane, so it's hard to get subscribed :)
Regarding the question about the "Debugged-by" line in the patch, debugging was
a joint effort between myself (Austin Clements <austin@xxxxxxxxxx>), David
Chase <drchase@xxxxxxxxxx>, and Ian Lance Taylor <ian@xxxxxxxx>.