Subject: Re: com driver hangs?
To: Ty Sarna <tsarna@endicor.com>
From: Charles M. Hannum <mycroft@mit.edu>
List: port-i386
Date: 03/28/1998 11:50:36
The hang you're referring to was reported to me by someone else, but I
haven't got around to fixing it yet.

The problem is a race condition between comclose() and comopen().  If
one process is doing a last close, and sleeps waiting for output to
drain or in the DTR hold, it's possible for another process to start
an open and start reinitializing the device at the same time.  When
comclose() wakes up, it will continue bashing the device, and lossage
ensues.

This is only partially fixed by my recent changes, in that it won't
happen due to the wait for output to drain, because of the additional
checks in comclose().  However, it's still possible, and I'll fix it
RSN.