mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 01:36:52 +09:00
i387: fix sense of sanity check
commitc38e234562upstream. The check for save_init_fpu() (introduced in commit5b1cbac377: "i387: make irq_fpu_usable() tests more robust") was the wrong way around, but I hadn't noticed, because my "tests" were bogus: the FPU exceptions are disabled by default, so even doing a divide by zero never actually triggers this code at all unless you do extra work to enable them. So if anybody did enable them, they'd get one spurious warning. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
00717d1f23
commit
09ffc93a8a
@@ -404,7 +404,7 @@ static inline void irq_ts_restore(int TS_state)
|
||||
*/
|
||||
static inline void save_init_fpu(struct task_struct *tsk)
|
||||
{
|
||||
WARN_ON_ONCE(task_thread_info(tsk)->status & TS_USEDFPU);
|
||||
WARN_ON_ONCE(!(task_thread_info(tsk)->status & TS_USEDFPU));
|
||||
preempt_disable();
|
||||
__save_init_fpu(tsk);
|
||||
stts();
|
||||
|
||||
Reference in New Issue
Block a user