提交 980ffc0a 编写于 作者: J Johan Hedberg 提交者: Marcel Holtmann

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: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org # 3.16.x
上级 49c922bb
...@@ -518,7 +518,7 @@ int hci_conn_del(struct hci_conn *conn) ...@@ -518,7 +518,7 @@ int hci_conn_del(struct hci_conn *conn)
/* Unacked frames */ /* Unacked frames */
hdev->acl_cnt += conn->sent; hdev->acl_cnt += conn->sent;
} else if (conn->type == LE_LINK) { } 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) if (hdev->le_pkts)
hdev->le_cnt += conn->sent; hdev->le_cnt += conn->sent;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册