aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/traps.c')
-rw-r--r--arch/x86/kernel/traps.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 482ec3af2067..8ba27dbc107a 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -599,10 +599,10 @@ void __math_state_restore(void)
599 * Careful.. There are problems with IBM-designed IRQ13 behaviour. 599 * Careful.. There are problems with IBM-designed IRQ13 behaviour.
600 * Don't touch unless you *really* know how it works. 600 * Don't touch unless you *really* know how it works.
601 * 601 *
602 * Must be called with kernel preemption disabled (in this case, 602 * Must be called with kernel preemption disabled (eg with local
603 * local interrupts are disabled at the call-site in entry.S). 603 * local interrupts as in the case of do_device_not_available).
604 */ 604 */
605asmlinkage void math_state_restore(void) 605void math_state_restore(void)
606{ 606{
607 struct thread_info *thread = current_thread_info(); 607 struct thread_info *thread = current_thread_info();
608 struct task_struct *tsk = thread->task; 608 struct task_struct *tsk = thread->task;
@@ -631,6 +631,7 @@ EXPORT_SYMBOL_GPL(math_state_restore);
631dotraplinkage void __kprobes 631dotraplinkage void __kprobes
632do_device_not_available(struct pt_regs *regs, long error_code) 632do_device_not_available(struct pt_regs *regs, long error_code)
633{ 633{
634 WARN_ON_ONCE(!user_mode_vm(regs));
634#ifdef CONFIG_MATH_EMULATION 635#ifdef CONFIG_MATH_EMULATION
635 if (read_cr0() & X86_CR0_EM) { 636 if (read_cr0() & X86_CR0_EM) {
636 struct math_emu_info info = { }; 637 struct math_emu_info info = { };