From: Andrew Morton Date: Sat, 25 Jun 2005 21:55:19 +0000 (-0700) Subject: [PATCH] uml: fix sizeof usage X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=350d5bd84ecda038bb482ab5f2596bdca68109d9;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [PATCH] uml: fix sizeof usage Size of pointer doesn't seem right, but maybe my solution isn't either (sig_size maybe?). Signed-off-by: Domen Puncer Signed-off-by: Jeff Dike Cc: Paolo Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c index 03913ca5d256..4efc69a039d7 100644 --- a/arch/um/sys-i386/signal.c +++ b/arch/um/sys-i386/signal.c @@ -312,7 +312,7 @@ long sys_sigreturn(struct pt_regs regs) unsigned long __user *extramask = frame->extramask; int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long); - if(copy_from_user(&set.sig[0], oldmask, sizeof(&set.sig[0])) || + if(copy_from_user(&set.sig[0], oldmask, sizeof(set.sig[0])) || copy_from_user(&set.sig[1], extramask, sig_size)) goto segfault;