diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-10-28 17:23:26 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-10-28 17:48:56 -0400 |
commit | 980ffc0a2cec2c37589cc97993e1ad17252f4f47 (patch) | |
tree | 228223f6d93d4bbfd41d36251f19a78475088997 /net/bluetooth/hci_conn.c | |
parent | 49c922bb1ec01ac3a98e5881f6c85ea7ef52d53f (diff) |
Bluetooth: Fix LE connection timeout deadlock
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
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r-- | net/bluetooth/hci_conn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 6a3225bf7bac..74b8e2421e96 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -518,7 +518,7 @@ int hci_conn_del(struct hci_conn *conn) | |||
518 | /* Unacked frames */ | 518 | /* Unacked frames */ |
519 | hdev->acl_cnt += conn->sent; | 519 | hdev->acl_cnt += conn->sent; |
520 | } else if (conn->type == LE_LINK) { | 520 | } else if (conn->type == LE_LINK) { |
521 | cancel_delayed_work_sync(&conn->le_conn_timeout); | 521 | cancel_delayed_work(&conn->le_conn_timeout); |
522 | 522 | ||
523 | if (hdev->le_pkts) | 523 | if (hdev->le_pkts) |
524 | hdev->le_cnt += conn->sent; | 524 | hdev->le_cnt += conn->sent; |