Source-Changes archive

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

CVS commit: [netbsd-5] src/sys

Module Name:    src
Committed By:   snj
Date:           Fri Feb  6 02:05:19 UTC 2009

Modified Files:
        src/sys/dev/wscons [netbsd-5]: wsdisplay.c
        src/sys/kern [netbsd-5]: tty.c
        src/sys/sys [netbsd-5]: tty.h

Log Message:
Pull up following revision(s) (requested by drochner in ticket #417):
        sys/dev/wscons/wsdisplay.c: revision 1.126
        sys/kern/tty.c: revision 1.230
        sys/sys/tty.h: revision 1.86
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.122.6.1 -r1.122.6.2 src/sys/dev/wscons/wsdisplay.c
cvs rdiff -r1.227 -r1.227.4.1 src/sys/kern/tty.c
cvs rdiff -r1.82 -r1.82.8.1 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