diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-07-01 05:34:49 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-07-01 05:34:49 +0200 |
commit | b223f4e215b32849b841e750e83a915b670070f5 (patch) | |
tree | 75340f6305028de331a17255018869822b3886d2 /arch/sparc/kernel/sigutil_32.c | |
parent | Remove last traces of ->sync_page (diff) | |
parent | vfs: clean up documentation (diff) | |
download | linux-b223f4e215b32849b841e750e83a915b670070f5.tar.xz linux-b223f4e215b32849b841e750e83a915b670070f5.zip |
Merge branch 'd_real' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs into work.misc
Diffstat (limited to 'arch/sparc/kernel/sigutil_32.c')
-rw-r--r-- | arch/sparc/kernel/sigutil_32.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/sparc/kernel/sigutil_32.c b/arch/sparc/kernel/sigutil_32.c index 0f6eebe71e6c..e5fe8cef9a69 100644 --- a/arch/sparc/kernel/sigutil_32.c +++ b/arch/sparc/kernel/sigutil_32.c @@ -48,6 +48,10 @@ int save_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu) int restore_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu) { int err; + + if (((unsigned long) fpu) & 3) + return -EFAULT; + #ifdef CONFIG_SMP if (test_tsk_thread_flag(current, TIF_USEDFPU)) regs->psr &= ~PSR_EF; @@ -97,7 +101,10 @@ int restore_rwin_state(__siginfo_rwin_t __user *rp) struct thread_info *t = current_thread_info(); int i, wsaved, err; - __get_user(wsaved, &rp->wsaved); + if (((unsigned long) rp) & 3) + return -EFAULT; + + get_user(wsaved, &rp->wsaved); if (wsaved > NSWINS) return -EFAULT; |