Add additional cred_free_thread() calls that I had missed the first time.
Pointed out by: jhb
This commit is contained in:
parent
b416fa1041
commit
08b38412c8
@ -596,6 +596,9 @@ 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;
|
||||
|
||||
@ -799,6 +802,9 @@ 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",
|
||||
|
@ -295,7 +295,7 @@ trap(frame)
|
||||
#ifdef DEV_NPX
|
||||
ucode = npxtrap();
|
||||
if (ucode == -1)
|
||||
goto out;
|
||||
goto userout;
|
||||
#else
|
||||
ucode = code;
|
||||
#endif
|
||||
@ -345,7 +345,7 @@ trap(frame)
|
||||
}
|
||||
#endif
|
||||
if (i == -1)
|
||||
goto out;
|
||||
goto userout;
|
||||
if (i == 0)
|
||||
goto user;
|
||||
|
||||
@ -370,7 +370,7 @@ trap(frame)
|
||||
lastalert = time_second;
|
||||
}
|
||||
mtx_unlock(&Giant);
|
||||
goto out;
|
||||
goto userout;
|
||||
#else /* !POWERFAIL_NMI */
|
||||
/* machine/parity/power fail/"kitchen sink" faults */
|
||||
/* XXX Giant */
|
||||
@ -385,7 +385,7 @@ trap(frame)
|
||||
kdb_trap (type, 0, &frame);
|
||||
}
|
||||
#endif /* DDB */
|
||||
goto out;
|
||||
goto userout;
|
||||
} else if (panic_on_nmi)
|
||||
panic("NMI indicates hardware failure");
|
||||
break;
|
||||
@ -406,7 +406,7 @@ trap(frame)
|
||||
#ifdef DEV_NPX
|
||||
/* transparent fault (due to context switch "late") */
|
||||
if (npxdna())
|
||||
goto out;
|
||||
goto userout;
|
||||
#endif
|
||||
if (!pmath_emulate) {
|
||||
i = SIGFPE;
|
||||
@ -418,7 +418,7 @@ trap(frame)
|
||||
mtx_unlock(&Giant);
|
||||
if (i == 0) {
|
||||
if (!(frame.tf_eflags & PSL_T))
|
||||
goto out;
|
||||
goto userout;
|
||||
frame.tf_eflags &= ~PSL_T;
|
||||
i = SIGTRAP;
|
||||
}
|
||||
@ -662,6 +662,10 @@ trap(frame)
|
||||
user:
|
||||
userret(td, &frame, sticks);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
userout:
|
||||
#ifdef DIAGNOSTIC
|
||||
cred_free_thread(td);
|
||||
#endif
|
||||
out:
|
||||
return;
|
||||
}
|
||||
@ -1106,6 +1110,10 @@ 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",
|
||||
|
@ -295,7 +295,7 @@ trap(frame)
|
||||
#ifdef DEV_NPX
|
||||
ucode = npxtrap();
|
||||
if (ucode == -1)
|
||||
goto out;
|
||||
goto userout;
|
||||
#else
|
||||
ucode = code;
|
||||
#endif
|
||||
@ -345,7 +345,7 @@ trap(frame)
|
||||
}
|
||||
#endif
|
||||
if (i == -1)
|
||||
goto out;
|
||||
goto userout;
|
||||
if (i == 0)
|
||||
goto user;
|
||||
|
||||
@ -370,7 +370,7 @@ trap(frame)
|
||||
lastalert = time_second;
|
||||
}
|
||||
mtx_unlock(&Giant);
|
||||
goto out;
|
||||
goto userout;
|
||||
#else /* !POWERFAIL_NMI */
|
||||
/* machine/parity/power fail/"kitchen sink" faults */
|
||||
/* XXX Giant */
|
||||
@ -385,7 +385,7 @@ trap(frame)
|
||||
kdb_trap (type, 0, &frame);
|
||||
}
|
||||
#endif /* DDB */
|
||||
goto out;
|
||||
goto userout;
|
||||
} else if (panic_on_nmi)
|
||||
panic("NMI indicates hardware failure");
|
||||
break;
|
||||
@ -406,7 +406,7 @@ trap(frame)
|
||||
#ifdef DEV_NPX
|
||||
/* transparent fault (due to context switch "late") */
|
||||
if (npxdna())
|
||||
goto out;
|
||||
goto userout;
|
||||
#endif
|
||||
if (!pmath_emulate) {
|
||||
i = SIGFPE;
|
||||
@ -418,7 +418,7 @@ trap(frame)
|
||||
mtx_unlock(&Giant);
|
||||
if (i == 0) {
|
||||
if (!(frame.tf_eflags & PSL_T))
|
||||
goto out;
|
||||
goto userout;
|
||||
frame.tf_eflags &= ~PSL_T;
|
||||
i = SIGTRAP;
|
||||
}
|
||||
@ -662,6 +662,10 @@ trap(frame)
|
||||
user:
|
||||
userret(td, &frame, sticks);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
userout:
|
||||
#ifdef DIAGNOSTIC
|
||||
cred_free_thread(td);
|
||||
#endif
|
||||
out:
|
||||
return;
|
||||
}
|
||||
@ -1106,6 +1110,10 @@ 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",
|
||||
|
@ -746,6 +746,9 @@ out:
|
||||
if (user) {
|
||||
userret(td, framep, sticks);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
#ifdef DIAGNOSTIC
|
||||
cred_free_thread(td);
|
||||
#endif
|
||||
}
|
||||
return;
|
||||
|
||||
@ -915,6 +918,9 @@ 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",
|
||||
@ -1089,6 +1095,10 @@ 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",
|
||||
|
@ -269,6 +269,9 @@ trap(struct trapframe *frame)
|
||||
|
||||
userret(td, frame, sticks);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
#ifdef DIAGNOSTIC
|
||||
cred_free_thread(td);
|
||||
#endif /* DIAGNOSTIC */
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -269,6 +269,9 @@ trap(struct trapframe *frame)
|
||||
|
||||
userret(td, frame, sticks);
|
||||
mtx_assert(&Giant, MA_NOTOWNED);
|
||||
#ifdef DIAGNOSTIC
|
||||
cred_free_thread(td);
|
||||
#endif /* DIAGNOSTIC */
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -392,6 +392,9 @@ 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;
|
||||
@ -680,6 +683,9 @@ 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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user