MFC r276532 and r276626:
The "cnputs_mtx" mutex must be allowed to recurse. Debug prints and/or witness printouts in the console driver clients can cause this mutex to recurse by calls to "printf()" from witness for example. In particular this can happen if "debug.witness.skipspin=0" is set in the boot environment.
This commit is contained in:
parent
3a6d6794aa
commit
f17550e390
@ -505,6 +505,13 @@ cnputs(char *p)
|
||||
int unlock_reqd = 0;
|
||||
|
||||
if (use_cnputs_mtx) {
|
||||
/*
|
||||
* NOTE: Debug prints and/or witness printouts in
|
||||
* console driver clients can cause the "cnputs_mtx"
|
||||
* mutex to recurse. Simply return if that happens.
|
||||
*/
|
||||
if (mtx_owned(&cnputs_mtx))
|
||||
return;
|
||||
mtx_lock_spin(&cnputs_mtx);
|
||||
unlock_reqd = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user