diff options
author | John W. Linville <linville@tuxdriver.com> | 2014-06-18 22:39:25 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-06-18 22:39:25 +0400 |
commit | 2ee3f63d39dbebd94b4a77df04455617ce12156b (patch) | |
tree | 55a96da26db65b0649fb4203512f9a10b7a3f4e1 /net/bluetooth/l2cap_core.c | |
parent | 62a02c98ce03bb214009509a4802b7b63f59621c (diff) | |
parent | 616a8394b5df8c88f4dd416f4527439a4e365034 (diff) | |
download | linux-2ee3f63d39dbebd94b4a77df04455617ce12156b.tar.xz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
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) kfree_skb(conn->rx_skb); skb_queue_purge(&conn->pending_rx); - flush_work(&conn->pending_rx_work); + + /* We can not call flush_work(&conn->pending_rx_work) here since we + * might block if we are running on a worker from the same workqueue + * pending_rx_work is waiting on. + */ + if (work_pending(&conn->pending_rx_work)) + cancel_work_sync(&conn->pending_rx_work); l2cap_unregister_all_users(conn); |