Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern It is useless to check for sigcontext_vec and compa...
details: https://anonhg.NetBSD.org/src/rev/00dd4c9b0695
branches: trunk
changeset: 784205:00dd4c9b0695
user: christos <christos%NetBSD.org@localhost>
date: Tue Jan 22 01:45:59 2013 +0000
description:
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?
diffstat:
sys/kern/sys_sig.c | 49 ++++++++++++++++++++++++++-----------------------
1 files changed, 26 insertions(+), 23 deletions(-)
diffs (73 lines):
diff -r 6ce29919babe -r 00dd4c9b0695 sys/kern/sys_sig.c
--- a/sys/kern/sys_sig.c Mon Jan 21 23:42:45 2013 +0000
+++ b/sys/kern/sys_sig.c Tue Jan 22 01:45:59 2013 +0000
@@ -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 @@
* 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) {
Home |
Main Index |
Thread Index |
Old Index