diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-06-30 23:34:49 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-06-30 23:34:49 -0400 |
commit | b223f4e215b32849b841e750e83a915b670070f5 (patch) | |
tree | 75340f6305028de331a17255018869822b3886d2 /arch/sparc/kernel/sigutil_64.c | |
parent | f4e6d844bdc142322905d137a9e44e07eee43c5c (diff) | |
parent | 0cac643c102c0632dc2cc81e2490b0fec1cac0af (diff) | |
download | linux-stable-b223f4e215b32849b841e750e83a915b670070f5.tar.gz linux-stable-b223f4e215b32849b841e750e83a915b670070f5.tar.bz2 linux-stable-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_64.c')
-rw-r--r-- | arch/sparc/kernel/sigutil_64.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/sparc/kernel/sigutil_64.c b/arch/sparc/kernel/sigutil_64.c index 387834a9c56a..36aadcbeac69 100644 --- a/arch/sparc/kernel/sigutil_64.c +++ b/arch/sparc/kernel/sigutil_64.c @@ -37,7 +37,10 @@ int restore_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu) unsigned long fprs; int err; - err = __get_user(fprs, &fpu->si_fprs); + if (((unsigned long) fpu) & 7) + return -EFAULT; + + err = get_user(fprs, &fpu->si_fprs); fprs_write(0); regs->tstate &= ~TSTATE_PEF; if (fprs & FPRS_DL) @@ -72,7 +75,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) & 7) + return -EFAULT; + + get_user(wsaved, &rp->wsaved); if (wsaved > NSWINS) return -EFAULT; |