mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
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: Gianluca Anzolin <gianluca@sottospazio.it> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
This commit is contained in:
parent
ece3150dea
commit
ffe6b68cc5
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue