mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-18 22:15:46 +01:00
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. MFC after: 1 week
This commit is contained in:
parent
f515135ff9
commit
2029b6c9e6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276532
@ -601,7 +601,13 @@ static void
|
||||
cn_drvinit(void *unused)
|
||||
{
|
||||
|
||||
mtx_init(&cnputs_mtx, "cnputs_mtx", NULL, MTX_SPIN | MTX_NOWITNESS);
|
||||
/*
|
||||
* NOTE: Debug prints and/or witness printouts in console
|
||||
* driver clients can cause the "cnputs_mtx" mutex to
|
||||
* recurse. Make sure the "MTX_RECURSE" flags is set!
|
||||
*/
|
||||
mtx_init(&cnputs_mtx, "cnputs_mtx", NULL, MTX_SPIN |
|
||||
MTX_NOWITNESS | MTX_RECURSE);
|
||||
use_cnputs_mtx = 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user