cvs commit: src/sys/kern subr_witness.c

John Baldwin jhb at
Thu Dec 29 12:53:04 PST 2005

jhb         2005-12-29 20:53:01 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             subr_witness.c 
  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

More information about the cvs-src mailing list