don't check for kdb reentry in trap_fatal(), it's impossible

trap() checks for it earlier and calls kdb_reentry().

Discussed with:	jhb
MFC after:	12 days
Sponsored by:	Panzura
This commit is contained in:
Andriy Gapon 2018-04-18 15:44:54 +00:00
parent 0b75ac7796
commit 6d83b2e971
3 changed files with 3 additions and 4 deletions

View File

@ -811,7 +811,7 @@ trap_fatal(frame, eva)
curproc->p_pid, curthread->td_name);
#ifdef KDB
if (debugger_on_panic || kdb_active)
if (debugger_on_panic)
if (kdb_trap(type, 0, frame))
return;
#endif

View File

@ -937,7 +937,7 @@ trap_fatal(frame, eva)
curproc->p_pid, curthread->td_name);
#ifdef KDB
if (debugger_on_panic || kdb_active) {
if (debugger_on_panic) {
frame->tf_err = eva; /* smuggle fault address to ddb */
if (kdb_trap(type, 0, frame)) {
frame->tf_err = code; /* restore error code */

View File

@ -452,8 +452,7 @@ trap_fatal(struct trapframe *frame)
printtrap(frame->exc, frame, 1, (frame->srr1 & PSL_PR));
#ifdef KDB
if ((debugger_on_panic || kdb_active) &&
kdb_trap(frame->exc, 0, frame))
if (debugger_on_panic && kdb_trap(frame->exc, 0, frame))
return;
#endif
panic("%s trap", trapname(frame->exc));