]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/fpu: Reset state for all signal restore failures
authorThomas Gleixner <tglx@linutronix.de>
Wed, 9 Jun 2021 19:18:00 +0000 (21:18 +0200)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Jun 2021 12:48:28 +0000 (08:48 -0400)
commit55cfd22f9b5a051fa815d6987825e00aa15427af
treedf2d5b1ab1d8009b1f85306728ebc084ad6106e2
parent7f9745ab342bcce5efd5d4d2297d0a3dd9db0eac
x86/fpu: Reset state for all signal restore failures

commit efa165504943f2128d50f63de0c02faf6dcceb0d upstream.

If access_ok() or fpregs_soft_set() fails in __fpu__restore_sig() then the
function just returns but does not clear the FPU state as it does for all
other fatal failures.

Clear the FPU state for these failures as well.

Fixes: 72a671ced66d ("x86, fpu: Unify signal handling code paths for x86 and x86_64 kernels")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/87mtryyhhz.ffs@nanos.tec.linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/fpu/signal.c