Commit ffe6b68c authored by Gianluca Anzolin's avatar Gianluca Anzolin Committed by Gustavo Padovan

Bluetooth: Purge the dlc->tx_queue to avoid circular dependency

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: default avatarGianluca Anzolin <gianluca@sottospazio.it>
Reviewed-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent ece3150d
...@@ -668,6 +668,12 @@ static void rfcomm_tty_cleanup(struct tty_struct *tty) ...@@ -668,6 +668,12 @@ static void rfcomm_tty_cleanup(struct tty_struct *tty)
tty->driver_data = NULL; tty->driver_data = NULL;
rfcomm_dlc_unlock(dev->dlc); 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); tty_port_put(&dev->port);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment