[Bluetooth] Hangup TTY before releasing rfcomm_dev
authorMikko Rapeli <mikko.rapeli@iki.fi>
Wed, 11 Jul 2007 07:18:15 +0000 (09:18 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 11 Jul 2007 05:01:26 +0000 (07:01 +0200)
commit84950cf0ba02fd6a5defe2511bc41f9aa2237632
treee6c6d6b243d8c8d5bafdaa9d2054458409b17c82
parent924f0e4a06419fa1996425d1d2512030e43acbba
[Bluetooth] Hangup TTY before releasing rfcomm_dev

The core problem is that RFCOMM socket layer ioctl can release
rfcomm_dev struct while RFCOMM TTY layer is still actively using
it. Calling tty_vhangup() is needed for a synchronous hangup before
rfcomm_dev is freed.

Addresses the oops at http://bugzilla.kernel.org/show_bug.cgi?id=7509

Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/rfcomm/tty.c