remove redundant checks of PK_MARKER.
This commit is contained in:
parent
c659665943
commit
b1521a3612
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_exit.c,v 1.226 2010/03/01 21:10:15 darran Exp $ */
|
||||
/* $NetBSD: kern_exit.c,v 1.227 2010/03/03 00:47:30 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
@ -67,7 +67,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.226 2010/03/01 21:10:15 darran Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.227 2010/03/03 00:47:30 yamt Exp $");
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
#include "opt_perfctrs.h"
|
||||
@ -436,8 +436,6 @@ exit1(struct lwp *l, int rv)
|
||||
*/
|
||||
if (__predict_false(p->p_slflag & PSL_CHTRACED)) {
|
||||
PROCLIST_FOREACH(q, &allproc) {
|
||||
if ((q->p_flag & PK_MARKER) != 0)
|
||||
continue;
|
||||
if (q->p_opptr == p)
|
||||
q->p_opptr = NULL;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_ktrace.c,v 1.150 2009/10/02 21:47:35 elad Exp $ */
|
||||
/* $NetBSD: kern_ktrace.c,v 1.151 2010/03/03 00:47:30 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
@ -61,7 +61,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.150 2009/10/02 21:47:35 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.151 2010/03/03 00:47:30 yamt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -499,7 +499,7 @@ ktrderefall(struct ktr_desc *ktd, int auth)
|
||||
|
||||
mutex_enter(proc_lock);
|
||||
PROCLIST_FOREACH(p, &allproc) {
|
||||
if ((p->p_flag & PK_MARKER) != 0 || p->p_tracep != ktd)
|
||||
if (p->p_tracep != ktd)
|
||||
continue;
|
||||
mutex_enter(p->p_lock);
|
||||
mutex_enter(&ktrace_lock);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_resource.c,v 1.154 2009/10/02 22:46:18 elad Exp $ */
|
||||
/* $NetBSD: kern_resource.c,v 1.155 2010/03/03 00:47:30 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1991, 1993
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.154 2009/10/02 22:46:18 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.155 2010/03/03 00:47:30 yamt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -192,8 +192,6 @@ sys_getpriority(struct lwp *l, const struct sys_getpriority_args *uap,
|
||||
if (who == 0)
|
||||
who = (int)kauth_cred_geteuid(l->l_cred);
|
||||
PROCLIST_FOREACH(p, &allproc) {
|
||||
if ((p->p_flag & PK_MARKER) != 0)
|
||||
continue;
|
||||
mutex_enter(p->p_lock);
|
||||
if (kauth_cred_geteuid(p->p_cred) ==
|
||||
(uid_t)who && p->p_nice < low)
|
||||
@ -263,8 +261,6 @@ sys_setpriority(struct lwp *l, const struct sys_setpriority_args *uap,
|
||||
if (who == 0)
|
||||
who = (int)kauth_cred_geteuid(l->l_cred);
|
||||
PROCLIST_FOREACH(p, &allproc) {
|
||||
if ((p->p_flag & PK_MARKER) != 0)
|
||||
continue;
|
||||
mutex_enter(p->p_lock);
|
||||
if (kauth_cred_geteuid(p->p_cred) ==
|
||||
(uid_t)SCARG(uap, who)) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_runq.c,v 1.29 2010/01/13 01:57:17 mrg Exp $ */
|
||||
/* $NetBSD: kern_runq.c,v 1.30 2010/03/03 00:47:30 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007, 2008 Mindaugas Rasiukevicius <rmind at NetBSD org>
|
||||
@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.29 2010/01/13 01:57:17 mrg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.30 2010/03/03 00:47:30 yamt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -892,8 +892,6 @@ sched_print_runqueue(void (*pr)(const char *, ...)
|
||||
"LID", "PRI", "EPRI", "FL", "ST", "LWP", "CPU", "TCI", "LRTICKS");
|
||||
|
||||
PROCLIST_FOREACH(p, &allproc) {
|
||||
if ((p->p_flag & PK_MARKER) != 0)
|
||||
continue;
|
||||
(*pr)(" /- %d (%s)\n", (int)p->p_pid, p->p_comm);
|
||||
LIST_FOREACH(l, &p->p_lwps, l_sibling) {
|
||||
ci = l->l_cpu;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_sig.c,v 1.303 2010/03/01 21:10:17 darran Exp $ */
|
||||
/* $NetBSD: kern_sig.c,v 1.304 2010/03/03 00:47:31 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
@ -66,7 +66,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.303 2010/03/01 21:10:17 darran Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.304 2010/03/03 00:47:31 yamt Exp $");
|
||||
|
||||
#include "opt_ptrace.h"
|
||||
#include "opt_compat_sunos.h"
|
||||
@ -862,7 +862,7 @@ killpg1(struct lwp *l, ksiginfo_t *ksi, int pgid, int all)
|
||||
*/
|
||||
PROCLIST_FOREACH(p, &allproc) {
|
||||
if (p->p_pid <= 1 || p == cp ||
|
||||
p->p_flag & (PK_SYSTEM|PK_MARKER))
|
||||
(p->p_flag & PK_SYSTEM) != 0)
|
||||
continue;
|
||||
mutex_enter(p->p_lock);
|
||||
if (kauth_authorize_process(pc,
|
||||
@ -2283,8 +2283,6 @@ proc_stop_callout(void *cookie)
|
||||
|
||||
mutex_enter(proc_lock);
|
||||
PROCLIST_FOREACH(p, &allproc) {
|
||||
if ((p->p_flag & PK_MARKER) != 0)
|
||||
continue;
|
||||
mutex_enter(p->p_lock);
|
||||
|
||||
if ((p->p_sflag & PS_STOPPING) == 0) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_synch.c,v 1.279 2010/02/23 22:19:27 darran Exp $ */
|
||||
/* $NetBSD: kern_synch.c,v 1.280 2010/03/03 00:47:31 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009
|
||||
@ -69,7 +69,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.279 2010/02/23 22:19:27 darran Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.280 2010/03/03 00:47:31 yamt Exp $");
|
||||
|
||||
#include "opt_kstack.h"
|
||||
#include "opt_perfctrs.h"
|
||||
@ -1033,9 +1033,6 @@ suspendsched(void)
|
||||
*/
|
||||
mutex_enter(proc_lock);
|
||||
PROCLIST_FOREACH(p, &allproc) {
|
||||
if ((p->p_flag & PK_MARKER) != 0)
|
||||
continue;
|
||||
|
||||
mutex_enter(p->p_lock);
|
||||
if ((p->p_flag & PK_SYSTEM) != 0) {
|
||||
mutex_exit(p->p_lock);
|
||||
@ -1177,9 +1174,6 @@ sched_pstats(void *arg)
|
||||
|
||||
mutex_enter(proc_lock);
|
||||
PROCLIST_FOREACH(p, &allproc) {
|
||||
if (__predict_false((p->p_flag & PK_MARKER) != 0))
|
||||
continue;
|
||||
|
||||
/* Increment sleep time (if sleeping), ignore overflow. */
|
||||
mutex_enter(p->p_lock);
|
||||
runtm = p->p_rtime.sec;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vfs_syscalls.c,v 1.403 2010/01/15 01:00:46 pooka Exp $ */
|
||||
/* $NetBSD: vfs_syscalls.c,v 1.404 2010/03/03 00:47:31 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
|
||||
@ -66,7 +66,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.403 2010/01/15 01:00:46 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.404 2010/03/03 00:47:31 yamt Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_fileassoc.h"
|
||||
@ -578,8 +578,6 @@ checkdirs(struct vnode *olddp)
|
||||
retry = false;
|
||||
mutex_enter(proc_lock);
|
||||
PROCLIST_FOREACH(p, &allproc) {
|
||||
if ((p->p_flag & PK_MARKER) != 0)
|
||||
continue;
|
||||
if ((cwdi = p->p_cwdi) == NULL)
|
||||
continue;
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user