HomeFreeBSD

Fix a deadlock I introduced with the recently added printf to warn about
rS153853Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

Fix a deadlock I introduced with the recently added printf to warn about
spin locks that are not in the static order list. It is not safe to call
printf while holding the witness spin mutex since the console drivers that
back printf may need to use their own spin locks which would try to talk
to witness when they were locked. Given this, it is possible for one
CPU to lock a console driver lock (such as sio) which then tries to lock
the witness lock while another CPU is doing the printf while holding the
witness lock. Fix this by moving the printf outside of the witness lock.
All other printf's in witness are already correct.

MFC after: 3 days

Details

Provenance
jhbAuthored on
Parents
rS153852: MFC: provide example of how to make two keyboards working at the same time
Branches
Unknown
Tags
Unknown

Event Timeline