]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
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 ed5274a5bb0f48f12e16b166e5fadfc16e18fd2a..448fde96963c77fae62e6d952b0d3b673be0e3c1 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;