diff options
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 6eabbe05fe54..323f23cd2c37 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -1663,7 +1663,13 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err) | |||
1663 | kfree_skb(conn->rx_skb); | 1663 | kfree_skb(conn->rx_skb); |
1664 | 1664 | ||
1665 | skb_queue_purge(&conn->pending_rx); | 1665 | skb_queue_purge(&conn->pending_rx); |
1666 | flush_work(&conn->pending_rx_work); | 1666 | |
1667 | /* We can not call flush_work(&conn->pending_rx_work) here since we | ||
1668 | * might block if we are running on a worker from the same workqueue | ||
1669 | * pending_rx_work is waiting on. | ||
1670 | */ | ||
1671 | if (work_pending(&conn->pending_rx_work)) | ||
1672 | cancel_work_sync(&conn->pending_rx_work); | ||
1667 | 1673 | ||
1668 | l2cap_unregister_all_users(conn); | 1674 | l2cap_unregister_all_users(conn); |
1669 | 1675 | ||