Date: Thu, 29 Dec 2005 20:53:01 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern subr_witness.c Message-ID: <200512292053.jBTKr1Br082722@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jhb 2005-12-29 20:53:01 UTC FreeBSD src repository Modified files: sys/kern subr_witness.c Log: 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 Revision Changes Path 1.208 +14 -12 src/sys/kern/subr_witness.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512292053.jBTKr1Br082722>