diff options
Diffstat (limited to 'arch/x86/kernel/signal_64.c')
-rw-r--r-- | arch/x86/kernel/signal_64.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index 87a9c2f28d99..162da796a323 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c | |||
@@ -100,7 +100,16 @@ static inline int restore_i387(struct _fpstate __user *buf) | |||
100 | clts(); | 100 | clts(); |
101 | task_thread_info(current)->status |= TS_USEDFPU; | 101 | task_thread_info(current)->status |= TS_USEDFPU; |
102 | } | 102 | } |
103 | return restore_fpu_checking((__force struct i387_fxsave_struct *)buf); | 103 | err = restore_fpu_checking((__force struct i387_fxsave_struct *)buf); |
104 | if (unlikely(err)) { | ||
105 | /* | ||
106 | * Encountered an error while doing the restore from the | ||
107 | * user buffer, clear the fpu state. | ||
108 | */ | ||
109 | clear_fpu(tsk); | ||
110 | clear_used_math(); | ||
111 | } | ||
112 | return err; | ||
104 | } | 113 | } |
105 | 114 | ||
106 | /* | 115 | /* |