Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys



Module Name:    src
Committed By:   drochner
Date:           Thu Jan 22 20:40:20 UTC 2009

Modified Files:
        src/sys/dev/wscons: wsdisplay.c
        src/sys/kern: tty.c
        src/sys/sys: tty.h

Log Message:
Avoid deadlock in tty code if a terminal emulation responds to
type/status/etc inquiries. (PR kern/37915)
This is clearly a design problem in tty, but we need a cheap fix now.
The problem is that ttyinput() tries to pull a spinlock which
is already held on calls to t_oproc.
The workaround is based on the fact that within wscons code, the
wsdisplay_emulinput() function is only called directly from
wsdisplaystart(). So we can be sure that the tty lock is held,
and use an inofficial entry point in ttc.c which avoids the locking.
These ate certainly more assumptions than needed by the fix
proposed in the PR, but it doesn't affect (and slow down) other
tty drivers.


To generate a diff of this commit:
cvs rdiff -r1.125 -r1.126 src/sys/dev/wscons/wsdisplay.c
cvs rdiff -r1.229 -r1.230 src/sys/kern/tty.c
cvs rdiff -r1.85 -r1.86 src/sys/sys/tty.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Home | Main Index | Thread Index | Old Index