Module Name: src
Committed By: christos
Date: Sat Jun 9 02:55:33 UTC 2012
Modified Files:
src/sys/kern: kern_lwp.c kern_prot.c kern_uidinfo.c
Log Message:
Remove debugging.
To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/kern/kern_lwp.c
cvs rdiff -u -r1.115 -r1.116 src/sys/kern/kern_prot.c
cvs rdiff -u -r1.6 -r1.7 src/sys/kern/kern_uidinfo.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/kern_lwp.c
diff -u src/sys/kern/kern_lwp.c:1.169 src/sys/kern/kern_lwp.c:1.170
--- src/sys/kern/kern_lwp.c:1.169 Fri Jun 8 22:31:14 2012
+++ src/sys/kern/kern_lwp.c Fri Jun 8 22:55:32 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_lwp.c,v 1.169 2012/06/09 02:31:14 christos Exp $ */
+/* $NetBSD: kern_lwp.c,v 1.170 2012/06/09 02:55:32 christos Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -211,7 +211,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.169 2012/06/09 02:31:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.170 2012/06/09 02:55:32 christos Exp $");
#include "opt_ddb.h"
#include "opt_lockdebug.h"
@@ -735,11 +735,8 @@ lwp_create(lwp_t *l1, proc_t *p2, vaddr_
KAUTH_ARG(KAUTH_REQ_PROCESS_RLIMIT_BYPASS),
&p2->p_rlimit[RLIMIT_NTHR], KAUTH_ARG(RLIMIT_NTHR))
!= 0) {
- if ((count = chglwpcnt(uid, -1)) < 0)
- printf("%s, %d: %s, %d, %d\n", __FILE__,
- __LINE__, l1->l_proc->p_comm,
- l1->l_proc->p_pid, count);
- // return EAGAIN;
+ (void)chglwpcnt(uid, -1);
+ return EAGAIN;
}
}
}
@@ -1110,9 +1107,7 @@ lwp_free(struct lwp *l, bool recycle, bo
KASSERT(last || mutex_owned(p->p_lock));
if (p != &proc0 && p->p_nlwps != 1)
- if (chglwpcnt(kauth_cred_getuid(l->l_cred), -1) < 0)
- printf("%s, %d: %d, %s\n", __FILE__, __LINE__,
- p->p_pid, p->p_comm);
+ (void)chglwpcnt(kauth_cred_getuid(l->l_cred), -1);
/*
* If this was not the last LWP in the process, then adjust
* counters and unlock.
Index: src/sys/kern/kern_prot.c
diff -u src/sys/kern/kern_prot.c:1.115 src/sys/kern/kern_prot.c:1.116
--- src/sys/kern/kern_prot.c:1.115 Fri Jun 8 22:31:15 2012
+++ src/sys/kern/kern_prot.c Fri Jun 8 22:55:32 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_prot.c,v 1.115 2012/06/09 02:31:15 christos Exp $ */
+/* $NetBSD: kern_prot.c,v 1.116 2012/06/09 02:55:32 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1990, 1991, 1993
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_prot.c,v 1.115 2012/06/09 02:31:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_prot.c,v 1.116 2012/06/09 02:55:32 christos Exp $");
#include "opt_compat_43.h"
@@ -349,9 +349,7 @@ do_setresuid(struct lwp *l, uid_t r, uid
/* The first lwp of a process is not counted */
int nlwps = p->p_nlwps - 1;
- if (chglwpcnt(kauth_cred_getuid(ncred), -nlwps) < 0)
- printf("%s, %d: %d, %s %d\n", __FILE__, __LINE__,
- p->p_pid, p->p_comm, nlwps);
+ (void)chglwpcnt(kauth_cred_getuid(ncred), -nlwps);
(void)chglwpcnt(r, nlwps);
kauth_cred_setuid(ncred, r);
Index: src/sys/kern/kern_uidinfo.c
diff -u src/sys/kern/kern_uidinfo.c:1.6 src/sys/kern/kern_uidinfo.c:1.7
--- src/sys/kern/kern_uidinfo.c:1.6 Fri Jun 8 22:31:15 2012
+++ src/sys/kern/kern_uidinfo.c Fri Jun 8 22:55:32 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_uidinfo.c,v 1.6 2012/06/09 02:31:15 christos Exp $ */
+/* $NetBSD: kern_uidinfo.c,v 1.7 2012/06/09 02:55:32 christos Exp $ */
/*-
* Copyright (c) 1982, 1986, 1991, 1993
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_uidinfo.c,v 1.6 2012/06/09 02:31:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_uidinfo.c,v 1.7 2012/06/09 02:55:32 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -214,12 +214,7 @@ chglwpcnt(uid_t uid, int diff)
uip = uid_find(uid);
lwpcnt = atomic_add_long_nv(&uip->ui_lwpcnt, diff);
-#if 0
KASSERT(lwpcnt >= 0);
-#else
- if (lwpcnt < 0)
- printf("pid=%d lwpcnt=%ld\n", uid, lwpcnt);
-#endif
return lwpcnt;
}