Commit 34669c68 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] Fix fwait on x86-64 too

Discard FPU exceptions in exit and execve on x86-64 too.
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 15b54794
...@@ -48,7 +48,7 @@ static inline int need_signal_i387(struct task_struct *me) ...@@ -48,7 +48,7 @@ static inline int need_signal_i387(struct task_struct *me)
#define clear_fpu(tsk) do { \ #define clear_fpu(tsk) do { \
if ((tsk)->thread_info->status & TS_USEDFPU) { \ if ((tsk)->thread_info->status & TS_USEDFPU) { \
asm volatile("fwait"); \ asm volatile("fnclex ; fwait"); \
(tsk)->thread_info->status &= ~TS_USEDFPU; \ (tsk)->thread_info->status &= ~TS_USEDFPU; \
stts(); \ stts(); \
} \ } \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment