summaryrefslogtreecommitdiffstats
path: root/include/linux/hdlcdrv.h
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2011-11-16 16:27:09 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-17 11:36:12 -0800
commit0c73c08ec73dbe080b9ec56696ee21d32754d918 (patch)
tree1ea6d927a4766dfa0f24ad4ec482eeb6187c3c98 /include/linux/hdlcdrv.h
parent300420722e0734a4254f3b634e0f82664495d210 (diff)
downloadblackbird-op-linux-0c73c08ec73dbe080b9ec56696ee21d32754d918.tar.gz
blackbird-op-linux-0c73c08ec73dbe080b9ec56696ee21d32754d918.zip
TTY: ldisc, wait for ldisc infinitely in hangup
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> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/hdlcdrv.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud