Remove unused diagnostic function cread_free_thread().
Approved by: alfred
This commit is contained in:
parent
43f0d4bddc
commit
ef6f2f567d
@ -589,9 +589,6 @@ trap(a0, a1, a2, entry, framep)
|
||||
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",
|
||||
|
@ -651,9 +651,6 @@ trap(frame)
|
||||
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",
|
||||
|
@ -651,9 +651,6 @@ trap(frame)
|
||||
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",
|
||||
|
@ -740,9 +740,6 @@ trap(int vector, int imm, struct trapframe *framep)
|
||||
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",
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -205,8 +205,5 @@ ast(framep)
|
||||
}
|
||||
|
||||
userret(td, framep, sticks);
|
||||
#ifdef DIAGNOSTIC
|
||||
cred_free_thread(td);
|
||||
#endif
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -385,9 +385,6 @@ if ((type & ~T_KERNEL) != T_BREAKPOINT)
|
||||
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",
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user