This is a note to let you know that I've just added the patch titled
x86, fpu: __restore_xstate_sig()->math_state_restore() needs
preempt_disable()
to the 3.17-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
x86-fpu-__restore_xstate_sig-math_state_restore-needs-preempt_disable.patch
and it can be found in the queue-3.17 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From df24fb859a4e200d9324e2974229fbb7adf00aef Mon Sep 17 00:00:00 2001
From: Oleg Nesterov <[email protected]>
Date: Tue, 2 Sep 2014 19:57:17 +0200
Subject: x86, fpu: __restore_xstate_sig()->math_state_restore() needs
preempt_disable()
From: Oleg Nesterov <[email protected]>
commit df24fb859a4e200d9324e2974229fbb7adf00aef upstream.
Add preempt_disable() + preempt_enable() around math_state_restore() in
__restore_xstate_sig(). Otherwise __switch_to() after __thread_fpu_begin()
can overwrite fpu->state we are going to restore.
Signed-off-by: Oleg Nesterov <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Reviewed-by: Suresh Siddha <[email protected]>
Signed-off-by: H. Peter Anvin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
arch/x86/kernel/xsave.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/arch/x86/kernel/xsave.c
+++ b/arch/x86/kernel/xsave.c
@@ -402,8 +402,11 @@ int __restore_xstate_sig(void __user *bu
set_used_math();
}
- if (use_eager_fpu())
+ if (use_eager_fpu()) {
+ preempt_disable();
math_state_restore();
+ preempt_enable();
+ }
return err;
} else {
Patches currently in stable-queue which might be from [email protected] are
queue-3.17/x86-fpu-__restore_xstate_sig-math_state_restore-needs-preempt_disable.patch
queue-3.17/x86-fpu-shift-drop_init_fpu-from-save_xstate_sig-to-handle_signal.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html