Module Name: src Committed By: christos Date: Tue Jan 22 01:45:59 UTC 2013
Modified Files: src/sys/kern: sys_sig.c Log Message: It is useless to check for sigcontext_vec and compat module loading for PK_32 processes. The correct modules are already loaded, otherwise how is the process running? To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/kern/sys_sig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/sys_sig.c diff -u src/sys/kern/sys_sig.c:1.38 src/sys/kern/sys_sig.c:1.39 --- src/sys/kern/sys_sig.c:1.38 Wed Jul 18 16:30:07 2012 +++ src/sys/kern/sys_sig.c Mon Jan 21 20:45:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_sig.c,v 1.38 2012/07/18 20:30:07 christos Exp $ */ +/* $NetBSD: sys_sig.c,v 1.39 2013/01/22 01:45:59 christos Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.38 2012/07/18 20:30:07 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.39 2013/01/22 01:45:59 christos Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -399,30 +399,33 @@ sigaction1(struct lwp *l, int signum, co * again for this process. */ if (nsa != NULL) { - if (__predict_false(vers < 2) && - (p->p_lflag & PL_SIGCOMPAT) == 0) { - kernconfig_lock(); - if (sendsig_sigcontext_vec == NULL) { - (void)module_autoload("compat", - MODULE_CLASS_ANY); - } - if (sendsig_sigcontext_vec != NULL) { + if (__predict_false(vers < 2)) { + if (p->p_flag & PK_32) + v0v1valid = true; + else if ((p->p_lflag & PL_SIGCOMPAT) == 0) { + kernconfig_lock(); + if (sendsig_sigcontext_vec == NULL) { + (void)module_autoload("compat", + MODULE_CLASS_ANY); + } + if (sendsig_sigcontext_vec != NULL) { + /* + * We need to remember if the + * sigcontext method may be useable, + * because libc may use it even + * if siginfo is available. + */ + v0v1valid = true; + } + mutex_enter(proc_lock); /* - * We need to remember if the - * sigcontext method may be useable, - * because libc may use it even - * if siginfo is available. + * Prevent unload of compat module while + * this process remains. */ - v0v1valid = true; + p->p_lflag |= PL_SIGCOMPAT; + mutex_exit(proc_lock); + kernconfig_unlock(); } - mutex_enter(proc_lock); - /* - * Prevent unload of compat module while - * this process remains. - */ - p->p_lflag |= PL_SIGCOMPAT; - mutex_exit(proc_lock); - kernconfig_unlock(); } switch (vers) {