Skip to content

Commit

Permalink
[BLUETOOTH]: l2cap info_timer delete fix in hci_conn_del
Browse files Browse the repository at this point in the history
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: Dave Young <hidave.darkstar@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dave Young authored and David S. Miller committed Mar 3, 2008
1 parent 7e36763 commit 8e8440f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/bluetooth/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err)
l2cap_sock_kill(sk);
}

del_timer_sync(&conn->info_timer);
if (conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_SENT)
del_timer_sync(&conn->info_timer);

hcon->l2cap_data = NULL;
kfree(conn);
Expand Down

0 comments on commit 8e8440f

Please sign in to comment.