diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2012-07-24 23:05:28 (GMT) |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2012-09-18 22:51:26 (GMT) |
commit | 0ca5bd0d886578ad0afeceaa83458c0f35cb3c6b (patch) | |
tree | 97c8e2c62d1be5fd66c2a6da28d439255bd37ed1 /arch/x86/kernel/xsave.c | |
parent | 050902c011712ad4703038fa4489ec4edd87d396 (diff) | |
download | linux-0ca5bd0d886578ad0afeceaa83458c0f35cb3c6b.tar.xz |
x86, fpu: Consolidate inline asm routines for saving/restoring fpu state
Consolidate x86, x86_64 inline asm routines saving/restoring fpu state
using config_enabled().
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Link: http://lkml.kernel.org/r/1343171129-2747-3-git-send-email-suresh.b.siddha@intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel/xsave.c')
-rw-r--r-- | arch/x86/kernel/xsave.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c index 9e1a8a7..7a3d4df 100644 --- a/arch/x86/kernel/xsave.c +++ b/arch/x86/kernel/xsave.c @@ -176,8 +176,10 @@ int save_i387_xstate(void __user *buf) else err = fxsave_user(buf); - if (err) + if (unlikely(err)) { + __clear_user(buf, xstate_size); return err; + } user_fpu_end(); } else { sanitize_i387_state(tsk); |