git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[Bluetooth] Hangup TTY before releasing rfcomm_dev
[pandora-kernel.git]
/
net
/
bluetooth
/
rfcomm
/
tty.c
diff --git
a/net/bluetooth/rfcomm/tty.c
b/net/bluetooth/rfcomm/tty.c
index
b2b1cce
..
ba469b0
100644
(file)
--- a/
net/bluetooth/rfcomm/tty.c
+++ b/
net/bluetooth/rfcomm/tty.c
@@
-383,6
+383,10
@@
static int rfcomm_release_dev(void __user *arg)
if (req.flags & (1 << RFCOMM_HANGUP_NOW))
rfcomm_dlc_close(dev->dlc, 0);
+ /* Shut down TTY synchronously before freeing rfcomm_dev */
+ if (dev->tty)
+ tty_vhangup(dev->tty);
+
rfcomm_dev_del(dev);
rfcomm_dev_put(dev);
return 0;