Browse Source

x86: xsave: fix error condition in save_i387_xstate()

Actually return failure on error.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Suresh Siddha 16 years ago
parent
commit
f364eadab5
1 changed files with 2 additions and 0 deletions
  1. 2 0
      arch/x86/kernel/xsave.c

+ 2 - 0
arch/x86/kernel/xsave.c

@@ -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;