Skip to content

Commit

Permalink
Bluetooth: Fix LE connection timeout deadlock
Browse files Browse the repository at this point in the history
The le_conn_timeout() may call hci_le_conn_failed() which in turn may
call hci_conn_del(). Trying to use the _sync variant for cancelling the
conn timeout from hci_conn_del() could therefore result in a deadlock.
This patch converts hci_conn_del() to use the non-sync variant so the
deadlock is not possible.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org # 3.16.x
  • Loading branch information
Johan Hedberg authored and Marcel Holtmann committed Oct 28, 2014
1 parent 49c922b commit 980ffc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/hci_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ int hci_conn_del(struct hci_conn *conn)
/* Unacked frames */
hdev->acl_cnt += conn->sent;
} else if (conn->type == LE_LINK) {
cancel_delayed_work_sync(&conn->le_conn_timeout);
cancel_delayed_work(&conn->le_conn_timeout);

if (hdev->le_pkts)
hdev->le_cnt += conn->sent;
Expand Down

0 comments on commit 980ffc0

Please sign in to comment.