-
Dave Jones authored
2.4/2.5 kernels suffer from an infinitely long hang when a serial tty device is closed, and there are characters waiting to be sent. The hang occurs in tty_wait_until_sent. There is a timeout 'closing_wait' which defines how long to wait for the TX buffers to empty; the problem is that the serial layer totally ignores it. It is stored in two structures, 'info' and 'state'. It is initialised in the 'state' structure, but used from the 'info' structure. It turns out that 'hub6' was also missing. I'm not currently clear what the expected behaviour should be when the timeout is changed via setserial, and others have the port open - I've opted to preserve the timeout until all users close the port. It's trivial to change this behaviour though.
5ef8de79