x86: xsave: fix error condition in save_i387_xstate()
authorSuresh Siddha <suresh.b.siddha@intel.com>
Tue, 7 Oct 2008 21:04:27 +0000 (14:04 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 7 Oct 2008 21:36:01 +0000 (14:36 -0700)
Actually return failure on error.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/kernel/xsave.c

index ed5274a..448fde9 100644 (file)
@@ -121,6 +121,8 @@ int save_i387_xstate(void __user *buf)
                err |= __put_user(FP_XSTATE_MAGIC2,
                                  (__u32 __user *) (buf + sig_xstate_size
                                                    - FP_XSTATE_MAGIC2_SIZE));
+               if (err)
+                       return err;
        }
 
        return 1;