diff options
author | Jiri Slaby <jslaby@suse.cz> | 2011-11-16 16:27:09 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-26 09:08:36 -0800 |
commit | e901cc458a35b928f240dd3c1e3a565bfb4efa90 (patch) | |
tree | b9ea315cdc121e8499bd72c37f5f8a3b77d810aa /REPORTING-BUGS | |
parent | bb4006e04c27d6204da8b535be575d71c265875d (diff) |
TTY: ldisc, wait for ldisc infinitely in hangup
commit 0c73c08ec73dbe080b9ec56696ee21d32754d918 upstream.
For /dev/console case, we do not kill all ldisc users. It's due to
redirected_tty_write test in __tty_hangup. In that case there still
might be a process waiting e.g. in n_tty_read for input.
We wait for such processes to disappear. The problem is that we use a
timeout. After this timeout, we continue closing the ldisc and start
freeing tty resources. It obviously leads to crashes when the other
process is woken.
So to fix this, we wait infinitely before reiniting the ldisc. (The
tiocsetd remains untouched -- times out after 5s.)
This is nicely reproducible with this run from shell:
exec 0<>/dev/console 1<>/dev/console 2<>/dev/console
and stopping a getty like:
systemctl stop serial-getty@ttyS0.service
The crash proper may be produced only under load or with constified
timing the same as for 92f6fa09b.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Dave Young <hidave.darkstar@gmail.com>
Cc: Dave Jones <davej@redhat.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Dmitriy Matrosov <sgf.dma@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'REPORTING-BUGS')
0 files changed, 0 insertions, 0 deletions