diff options
| author | Gianluca Anzolin <gianluca@sottospazio.it> | 2013-07-29 17:08:13 +0200 |
|---|---|---|
| committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-08-20 11:34:01 +0200 |
| commit | 288f2fc4203559d225d84f1a0308198ad7a06c65 (patch) | |
| tree | 4b9732f2d2ce8e6368a77d1d4b6490e3c1312c29 | |
| parent | 77f577d52aefb92c350f65c4228958415a05510f (diff) | |
| download | bluetooth-next-288f2fc4203559d225d84f1a0308198ad7a06c65.tar.gz | |
Bluetooth: Purge the dlc->tx_queue to avoid circular dependency
Notice: this object is not reachable from any branch.
In rfcomm_tty_cleanup we purge the dlc->tx_queue which may contain
socket buffers referencing the tty_port and thus preventing the tty_port
destruction.
Signed-off-by: Gianluca Anzolin <gianluca@sottospazio.it>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Notice: this object is not reachable from any branch.
| -rw-r--r-- | net/bluetooth/rfcomm/tty.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index 3e078b73cc225b..6d126faf145fe5 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c @@ -668,6 +668,12 @@ static void rfcomm_tty_cleanup(struct tty_struct *tty) tty->driver_data = NULL; rfcomm_dlc_unlock(dev->dlc); + /* + * purge the dlc->tx_queue to avoid circular dependencies + * between dev and dlc + */ + skb_queue_purge(&dev->dlc->tx_queue); + tty_port_put(&dev->port); } |
