diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-18 06:59:32 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-12 09:17:39 -0400 |
commit | 9f482807a6bd7e2aa1ed0d8cfc48463ec4ca3568 (patch) | |
tree | 0050a865ffc49e71e9787ad1012d39a4c3c5d8b4 /arch/x86/kernel | |
parent | 620f2efcdc5c7a2db68da41bc3df3cf9a718024e (diff) |
x86, fpu: check __clear_user() return value
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>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/xsave.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c index 2f98323716d..9abac8a9d82 100644 --- a/arch/x86/kernel/xsave.c +++ b/arch/x86/kernel/xsave.c | |||
@@ -95,7 +95,9 @@ int save_i387_xstate(void __user *buf) | |||
95 | * Start with clearing the user buffer. This will present a | 95 | * Start with clearing the user buffer. This will present a |
96 | * clean context for the bytes not touched by the fxsave/xsave. | 96 | * clean context for the bytes not touched by the fxsave/xsave. |
97 | */ | 97 | */ |
98 | __clear_user(buf, sig_xstate_size); | 98 | err = __clear_user(buf, sig_xstate_size); |
99 | if (err) | ||
100 | return err; | ||
99 | 101 | ||
100 | if (task_thread_info(tsk)->status & TS_XSAVE) | 102 | if (task_thread_info(tsk)->status & TS_XSAVE) |
101 | err = xsave_user(buf); | 103 | err = xsave_user(buf); |