I have been investigating a situation where the login prompt begins to
fail on a serial console. What I have discovered is that there is an
unexpected call to the serial driver's hangup() routine, between the
login prompt and the password prompt.
I traced this to do_tty_hangup() (called from sys_vhangup), and I see
that it attempts to avoid calling the driver's hangup() routine for the
console device. The test for the console doesn't account for serial
console. The attached patch adds a check for ttyS0 if serial console is
configured.
I only see this problem only recent kernels, and I don't know what
changed to make it start happening. Perhaps someone else has a better
idea?
--Guy