Messages in this thread Patch in this message | | | Subject | [PATCH 1/8] UML - Fix sizeof usage | Date | Mon, 20 Jun 2005 14:51:11 -0400 | From | Jeff Dike <> |
| |
From: Domen Puncer <domen@coderock.org> 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@coderock.org> Signed-off-by: Jeff Dike <jdike@addtoit.com>
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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |