Commit 8e8440f5 authored by Dave Young's avatar Dave Young Committed by David S. Miller

[BLUETOOTH]: l2cap info_timer delete fix in hci_conn_del

When the l2cap info_timer is active the info_state will be set to
L2CAP_INFO_FEAT_MASK_REQ_SENT, and it will be unset after the timer is
deleted or timeout triggered.

Here in l2cap_conn_del only call del_timer_sync when the info_state is
set to L2CAP_INFO_FEAT_MASK_REQ_SENT.
Signed-off-by: default avatarDave Young <hidave.darkstar@gmail.com>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7e36763b
...@@ -417,6 +417,7 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err) ...@@ -417,6 +417,7 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err)
l2cap_sock_kill(sk); l2cap_sock_kill(sk);
} }
if (conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_SENT)
del_timer_sync(&conn->info_timer); del_timer_sync(&conn->info_timer);
hcon->l2cap_data = NULL; hcon->l2cap_data = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment