Commit de379379 authored by Mickaël Salaün's avatar Mickaël Salaün Committed by Linus Torvalds

um: Fix pointer cast

Fix a pointer cast typo introduced in v4.4-rc5 especially visible for
the i386 subarchitecture where it results in a kernel crash.

[ Also removed pointless cast as per Al Viro - Linus ]

Fixes: 8090bfd2 ("um: Fix fpstate handling")
Signed-off-by: default avatarMickaël Salaün <mic@digikod.net>
Cc: Jeff Dike <jdike@addtoit.com>
Acked-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4ef76753
...@@ -470,7 +470,7 @@ long sys_sigreturn(void) ...@@ -470,7 +470,7 @@ long sys_sigreturn(void)
struct sigcontext __user *sc = &frame->sc; struct sigcontext __user *sc = &frame->sc;
int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long); int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long);
if (copy_from_user(&set.sig[0], (void *)sc->oldmask, sizeof(set.sig[0])) || if (copy_from_user(&set.sig[0], &sc->oldmask, sizeof(set.sig[0])) ||
copy_from_user(&set.sig[1], frame->extramask, sig_size)) copy_from_user(&set.sig[1], frame->extramask, sig_size))
goto segfault; goto segfault;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment