git: MPSAFE TTY - Fix deadlock in reporting of probe errors.

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Aug 29 10:54:45 PDT 2010


commit 438acbcc599b3db8b97949a152027f27f8028066
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Aug 29 10:50:47 2010 -0700

     MPSAFE TTY - Fix deadlock in reporting of probe errors.
    
    * When sio can't drain it reports the fact, but it was doing it while
      still holding com_lock.  Rearranging the lock fixes the problem.
    
    * Clean up some unnecessary tty_tokens in critical code paths and rearrange
      code to not hold com_lock across tty_token acquisition calls.
    
    * Release the com_lock around breakpoint() (<enter>~^B sequence) to
      avoid a deadlock.
    
    * Detect and ignore a reentrant kprintf() to try to avoid a deadlock.
      The detection flag is also reset by a panic.

Summary of changes:
 sys/dev/serial/sio/sio.c |   57 ++++++++++++++++++++++-----------------------
 sys/kern/subr_prf.c      |   27 ++++++++++++++++++---
 sys/sys/globaldata.h     |    7 +++++-
 3 files changed, 57 insertions(+), 34 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/438acbcc599b3db8b97949a152027f27f8028066


-- 
DragonFly BSD source repository





More information about the Commits mailing list