From: Andrew Morton Date: Sat, 25 Jun 2005 21:55:19 +0000 (-0700) Subject: [PATCH] uml: fix sizeof usage X-Git-Tag: v2.6.13-rc1~68^2~183 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=350d5bd84ecda038bb482ab5f2596bdca68109d9;p=linux-2.6 [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 03913ca5d2..4efc69a039 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;