[PATCH 1/8] UML - Fix sizeof usage
From: Jeff Dike
Date: Mon Jun 20 2005 - 14:03:34 EST
From: Domen Puncer <domen@xxxxxxxxxxxx>
Subject: [KJ] [patch] um: copy_from_user size fix in signal.c
Size of pointer doesn't seem right, but maybe my solution isn't
either (sig_size maybe?).
Signed-off-by: Domen Puncer <domen@xxxxxxxxxxxx>
Signed-off-by: Jeff Dike <jdike@xxxxxxxxxxx>
Index: linux-2.6.12/arch/um/sys-i386/signal.c
===================================================================
--- linux-2.6.12.orig/arch/um/sys-i386/signal.c 2005-06-20 11:54:53.000000000 -0400
+++ linux-2.6.12/arch/um/sys-i386/signal.c 2005-06-20 11:55:47.000000000 -0400
@@ -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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/