[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150309171041.GB11388@redhat.com>
Date: Mon, 9 Mar 2015 18:10:41 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Dave Hansen <dave.hansen@...el.com>, Borislav Petkov <bp@...e.de>,
Ingo Molnar <mingo@...nel.org>
Cc: Andy Lutomirski <luto@...capital.net>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Pekka Riikonen <priikone@....fi>,
Rik van Riel <riel@...hat.com>,
Suresh Siddha <sbsiddha@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
"Yu, Fenghua" <fenghua.yu@...el.com>,
Quentin Casasnovas <quentin.casasnovas@...cle.com>
Subject: [PATCH] x86/fpu: drop_fpu() should not assume that tsk == current
drop_fpu() does clear_used_math() and usually this is correct because
tsk == current. However switch_fpu_finish()->restore_fpu_checking() is
called before it updates the "current_task" variable. If it fails, we
will wrongly clear the PF_USED_MATH flag of the previous task.
Signed-off-by: Oleg Nesterov <oleg@...hat.com>
Cc: <stable@...r.kernel.org>
---
arch/x86/include/asm/fpu-internal.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h
index 99a2067..81c86fa 100644
--- a/arch/x86/include/asm/fpu-internal.h
+++ b/arch/x86/include/asm/fpu-internal.h
@@ -336,7 +336,7 @@ static inline void drop_fpu(struct task_struct *tsk)
preempt_disable();
tsk->thread.fpu_counter = 0;
__drop_fpu(tsk);
- clear_used_math();
+ clear_stopped_child_used_math(tsk);
preempt_enable();
}
--
1.5.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists