summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Mini <mini@FreeBSD.org>2002-06-24 06:22:00 +0000
committerJonathan Mini <mini@FreeBSD.org>2002-06-24 06:22:00 +0000
commit01ad8a53db4469fef1993d2e56ba51ad7ca26686 (patch)
tree2fbf808f715e544884ceac40adea1a37d316bbed
parentb769fbf50f11131c97792fc4e44f402312268081 (diff)
Notes
-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 36559b9a9da3..6cdf9f43a665 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 c14e837b5ddf..45e5c3b6269a 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 c14e837b5ddf..45e5c3b6269a 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 ef0cebfff226..e38945fa4c43 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 50886453d182..016653bcb471 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 20273cecbc4f..a3e4beab7f35 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 add54bc2bcb1..3b415de5c401 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 e43e9ccbc1c1..067eb3a91a13 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 e43e9ccbc1c1..067eb3a91a13 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 289b8cf39624..61e3b445864b 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 26afb362e283..157d67208c74 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);