]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commit
tty_ldisc: Fix BUG() on hangup
authorPhilippe Rétornaz <philippe.retornaz@epfl.ch>
Wed, 27 Oct 2010 15:13:21 +0000 (17:13 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:32:41 +0000 (13:32 -0800)
commit45c0031e632b075512140a4a74267f279fb4b0cb
treee07fb4012fb5a651528c82d3e95f84d3e12dbf99
parent156998d5742b6bfc5ca9c5e6396a7ffc2adfe7b3
tty_ldisc: Fix BUG() on hangup

commit 1c95ba1e1de7edffc0c4e275e147f1a9eb1f81ae upstream.

A kernel BUG when bluetooth rfcomm connection drop while the associated
serial port is open is sometime triggered.

It seems that the line discipline can disappear between the
tty_ldisc_put and tty_ldisc_get. This patch fall back to the N_TTY line
discipline if the previous discipline is not available anymore.

Signed-off-by: Philippe Retornaz <philippe.retornaz@epfl.ch>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/tty_ldisc.c