Source-Changes archive

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

CVS commit: src/sys/dev/usb



Module Name:    src
Committed By:   mrg
Date:           Wed May  1 06:01:01 UTC 2019

Modified Files:
        src/sys/dev/usb: ucom.c

Log Message:
fix a locking botch in ucomhwiflow():

tty.c always calls t_hwiflow() with tty_lock held, and the caller
of this for ucom always holds sc->sc_lock when calling down into
the tty layer.

don't try to re-take the sc_lock in ucomhwiflow() (locking against
myself is triggered here currently), but instead assert that the
lock is already held _and_ that tty_lock is held.

in ucom_detach(), when closing pipes set sc_bulkin_pipe and
sc_bulkout_pipe to NULL.  fixes bug noticed by code inspection:
a failed detach would attempt to close them a second time.


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/dev/usb/ucom.c

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