]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86, fpu: check __clear_user() return value
authorIngo Molnar <mingo@elte.hu>
Mon, 18 Aug 2008 10:59:32 +0000 (12:59 +0200)
committerIngo Molnar <mingo@elte.hu>
Sun, 12 Oct 2008 13:17:39 +0000 (15:17 +0200)
fix warning:

  arch/x86/kernel/xsave.c: In function ‘save_i387_xstate’:
  arch/x86/kernel/xsave.c:98: warning: ignoring return value of ‘__clear_user’, declared with attribute warn_unused_result

check the return value and act on it. We should not be ignoring faults
at this point.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/xsave.c

index 2f98323716d9d720f98c77d15eb587ed3674ff1d..9abac8a9d823656b720e81023aed96147b82d6f8 100644 (file)
@@ -95,7 +95,9 @@ int save_i387_xstate(void __user *buf)
                 * Start with clearing the user buffer. This will present a
                 * clean context for the bytes not touched by the fxsave/xsave.
                 */
-               __clear_user(buf, sig_xstate_size);
+               err = __clear_user(buf, sig_xstate_size);
+               if (err)
+                       return err;
 
                if (task_thread_info(tsk)->status & TS_XSAVE)
                        err = xsave_user(buf);