Skip to content

Commit

Permalink
x86, fpu: check __clear_user() return value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ingo Molnar committed Oct 12, 2008
1 parent 620f2ef commit 9f48280
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/x86/kernel/xsave.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9f48280

Please sign in to comment.