kernel: limit stacktrace depth to 50.
- Unlikely to discard useful information and avoids long system lockups on machines configured to print system output to serial.
This commit is contained in:
parent
3c6274b8be
commit
515e8d075f
1 changed files with 3 additions and 0 deletions
|
@ -251,6 +251,7 @@ PUBLIC void proc_stacktrace(struct proc *whichproc)
|
||||||
{
|
{
|
||||||
reg_t v_bp, v_pc, v_hbp;
|
reg_t v_bp, v_pc, v_hbp;
|
||||||
int iskernel;
|
int iskernel;
|
||||||
|
int n = 0;
|
||||||
|
|
||||||
v_bp = whichproc->p_reg.fp;
|
v_bp = whichproc->p_reg.fp;
|
||||||
|
|
||||||
|
@ -279,6 +280,8 @@ PUBLIC void proc_stacktrace(struct proc *whichproc)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
v_bp = v_hbp;
|
v_bp = v_hbp;
|
||||||
|
if(n++ > 50)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue