summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormini <mini@FreeBSD.org>2002-06-24 06:22:00 +0000
committermini <mini@FreeBSD.org>2002-06-24 06:22:00 +0000
commitef6f2f567d1cf6942a9945002a5a13ef15c4abbb (patch)
tree2fbf808f715e544884ceac40adea1a37d316bbed
parent43f0d4bddcc8e92cbe8e883b8c22965ba082ce8d (diff)
downloadFreeBSD-src-ef6f2f567d1cf6942a9945002a5a13ef15c4abbb.zip
FreeBSD-src-ef6f2f567d1cf6942a9945002a5a13ef15c4abbb.tar.gz
Remove unused diagnostic function cread_free_thread().
Approved by: alfred
-rw-r--r--sys/alpha/alpha/trap.c6
-rw-r--r--sys/amd64/amd64/trap.c7
-rw-r--r--sys/i386/i386/trap.c7
-rw-r--r--sys/ia64/ia64/trap.c10
-rw-r--r--sys/kern/kern_fork.c3
-rw-r--r--sys/kern/kern_prot.c13
-rw-r--r--sys/kern/subr_trap.c3
-rw-r--r--sys/powerpc/aim/trap.c3
-rw-r--r--sys/powerpc/powerpc/trap.c3
-rw-r--r--sys/sparc64/sparc64/trap.c6
-rw-r--r--sys/sys/ucred.h3
11 files changed, 0 insertions, 64 deletions
diff --git a/sys/alpha/alpha/trap.c b/sys/alpha/alpha/trap.c
index 36559b9..6cdf9f4 100644
--- a/sys/alpha/alpha/trap.c
+++ b/sys/alpha/alpha/trap.c
@@ -589,9 +589,6 @@ out:
framep->tf_regs[FRAME_SP] = alpha_pal_rdusp();
userret(td, framep, sticks);
mtx_assert(&Giant, MA_NOTOWNED);
-#ifdef DIAGNOSTIC
- cred_free_thread(td);
-#endif
}
return;
@@ -778,9 +775,6 @@ syscall(code, framep)
*/
STOPEVENT(p, S_SCX, code);
-#ifdef DIAGNOSTIC
- cred_free_thread(td);
-#endif
#ifdef WITNESS
if (witness_list(td)) {
panic("system call %s returning with mutex(s) held\n",
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index c14e837..45e5c3b 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -651,9 +651,6 @@ user:
userret(td, &frame, sticks);
mtx_assert(&Giant, MA_NOTOWNED);
userout:
-#ifdef DIAGNOSTIC
- cred_free_thread(td);
-#endif
out:
return;
}
@@ -1079,10 +1076,6 @@ syscall(frame)
*/
STOPEVENT(p, S_SCX, code);
-#ifdef DIAGNOSTIC
- cred_free_thread(td);
-#endif
-
#ifdef WITNESS
if (witness_list(td)) {
panic("system call %s returning with mutex(s) held\n",
diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c
index c14e837..45e5c3b 100644
--- a/sys/i386/i386/trap.c
+++ b/sys/i386/i386/trap.c
@@ -651,9 +651,6 @@ user:
userret(td, &frame, sticks);
mtx_assert(&Giant, MA_NOTOWNED);
userout:
-#ifdef DIAGNOSTIC
- cred_free_thread(td);
-#endif
out:
return;
}
@@ -1079,10 +1076,6 @@ syscall(frame)
*/
STOPEVENT(p, S_SCX, code);
-#ifdef DIAGNOSTIC
- cred_free_thread(td);
-#endif
-
#ifdef WITNESS
if (witness_list(td)) {
panic("system call %s returning with mutex(s) held\n",
diff --git a/sys/ia64/ia64/trap.c b/sys/ia64/ia64/trap.c
index ef0cebf..e38945f 100644
--- a/sys/ia64/ia64/trap.c
+++ b/sys/ia64/ia64/trap.c
@@ -740,9 +740,6 @@ out:
if (user) {
userret(td, framep, sticks);
mtx_assert(&Giant, MA_NOTOWNED);
-#ifdef DIAGNOSTIC
- cred_free_thread(td);
-#endif
}
return;
@@ -894,9 +891,6 @@ syscall(int code, u_int64_t *args, struct trapframe *framep)
*/
STOPEVENT(p, S_SCX, code);
-#ifdef DIAGNOSTIC
- cred_free_thread(td);
-#endif
#ifdef WITNESS
if (witness_list(td)) {
panic("system call %s returning with mutex(s) held\n",
@@ -1071,10 +1065,6 @@ ia32_syscall(struct trapframe *framep)
*/
STOPEVENT(p, S_SCX, code);
-#ifdef DIAGNOSTIC
- cred_free_thread(td);
-#endif
-
#ifdef WITNESS
if (witness_list(td)) {
panic("system call %s returning with mutex(s) held\n",
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 5088645..016653b 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -842,9 +842,6 @@ fork_exit(callout, arg, frame)
kthread_exit(0);
}
PROC_UNLOCK(p);
-#ifdef DIAGNOSTIC
- cred_free_thread(td);
-#endif
mtx_assert(&Giant, MA_NOTOWNED);
}
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 20273ce..a3e4bea 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -1767,19 +1767,6 @@ crdup(struct ucred *cr)
return (newcr);
}
-#ifdef DIAGNOSTIC
-void
-cred_free_thread(struct thread *td)
-{
- struct ucred *cred;
-
- cred = td->td_ucred;
- td->td_ucred = NULL;
- if (cred != NULL)
- crfree(cred);
-}
-#endif
-
/*
* Fill in a struct xucred based on a struct ucred.
*/
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
index add54bc..3b415de 100644
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -205,8 +205,5 @@ ast(framep)
}
userret(td, framep, sticks);
-#ifdef DIAGNOSTIC
- cred_free_thread(td);
-#endif
mtx_assert(&Giant, MA_NOTOWNED);
}
diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c
index e43e9cc..067eb3a 100644
--- a/sys/powerpc/aim/trap.c
+++ b/sys/powerpc/aim/trap.c
@@ -269,9 +269,6 @@ trap(struct trapframe *frame)
userret(td, frame, sticks);
mtx_assert(&Giant, MA_NOTOWNED);
-#ifdef DIAGNOSTIC
- cred_free_thread(td);
-#endif /* DIAGNOSTIC */
}
static void
diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c
index e43e9cc..067eb3a 100644
--- a/sys/powerpc/powerpc/trap.c
+++ b/sys/powerpc/powerpc/trap.c
@@ -269,9 +269,6 @@ trap(struct trapframe *frame)
userret(td, frame, sticks);
mtx_assert(&Giant, MA_NOTOWNED);
-#ifdef DIAGNOSTIC
- cred_free_thread(td);
-#endif /* DIAGNOSTIC */
}
static void
diff --git a/sys/sparc64/sparc64/trap.c b/sys/sparc64/sparc64/trap.c
index 289b8cf..61e3b44 100644
--- a/sys/sparc64/sparc64/trap.c
+++ b/sys/sparc64/sparc64/trap.c
@@ -385,9 +385,6 @@ trapsig:
user:
userret(td, tf, sticks);
mtx_assert(&Giant, MA_NOTOWNED);
-#ifdef DIAGNOSTIC
- cred_free_thread(td);
-#endif
out:
CTR1(KTR_TRAP, "trap: td=%p return", td);
return;
@@ -659,9 +656,6 @@ syscall(struct trapframe *tf)
*/
STOPEVENT(p, S_SCX, code);
-#ifdef DIAGNOSTIC
- cred_free_thread(td);
-#endif
#ifdef WITNESS
if (witness_list(td)) {
panic("system call %s returning with mutex(s) held\n",
diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h
index 26afb36..157d672 100644
--- a/sys/sys/ucred.h
+++ b/sys/sys/ucred.h
@@ -80,9 +80,6 @@ struct xucred {
#ifdef _KERNEL
struct thread;
-#ifdef DIAGNOSTIC
-void cred_free_thread(struct thread *td);
-#endif
void cred_update_thread(struct thread *td);
void change_egid(struct ucred *newcred, gid_t egid);
void change_euid(struct ucred *newcred, struct uidinfo *euip);
OpenPOWER on IntegriCloud