summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/fpu-internal.h
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2015-02-06 15:02:00 -0500
committerBorislav Petkov <bp@suse.de>2015-02-19 11:15:03 +0100
commit08a744c6bfded3d5fa66f94263f81773226113d1 (patch)
treea32ef7c2c947b7331eeb52480948ce41e6fa8431 /arch/x86/include/asm/fpu-internal.h
parent1a2a7f4ec8e3a7ac582dac4d01fcc7e8acd3bb30 (diff)
downloadlinux-08a744c6bfded3d5fa66f94263f81773226113d1.tar.gz
linux-08a744c6bfded3d5fa66f94263f81773226113d1.tar.bz2
linux-08a744c6bfded3d5fa66f94263f81773226113d1.zip
x86/fpu: Change math_error() to use unlazy_fpu(), kill (now) unused save_init_fpu()
math_error() calls save_init_fpu() after conditional_sti(), this means that the caller can be preempted. If !use_eager_fpu() we can hit the WARN_ON_ONCE(!__thread_has_fpu(tsk)) and/or save the wrong FPU state. Change math_error() to use unlazy_fpu() and kill save_init_fpu(). Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Rik van Riel <riel@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/1423252925-14451-4-git-send-email-riel@redhat.com Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'arch/x86/include/asm/fpu-internal.h')
-rw-r--r--arch/x86/include/asm/fpu-internal.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h
index e97622f57722..02f2e0817918 100644
--- a/arch/x86/include/asm/fpu-internal.h
+++ b/arch/x86/include/asm/fpu-internal.h
@@ -518,24 +518,6 @@ static inline void __save_fpu(struct task_struct *tsk)
}
/*
- * These disable preemption on their own and are safe
- */
-static inline void save_init_fpu(struct task_struct *tsk)
-{
- WARN_ON_ONCE(!__thread_has_fpu(tsk));
-
- if (use_eager_fpu()) {
- __save_fpu(tsk);
- return;
- }
-
- preempt_disable();
- __save_init_fpu(tsk);
- __thread_fpu_end(tsk);
- preempt_enable();
-}
-
-/*
* i387 state interaction
*/
static inline unsigned short get_fpu_cwd(struct task_struct *tsk)