diff options
author | Dave Young <hidave.darkstar@gmail.com> | 2008-03-03 15:18:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-03 15:18:55 -0500 |
commit | 8e8440f53593b5f9c695f18b493b535873dbb9da (patch) | |
tree | e0429845227215de8284bcd9e7824ad26d4c8b7b /net/bluetooth/l2cap.c | |
parent | 7e36763b2c204d59de4e88087f84a2c0c8421f25 (diff) |
[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: Dave Young <hidave.darkstar@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r-- | net/bluetooth/l2cap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 7c5459c8e8ef..34f8bf98bc05 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -417,7 +417,8 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err) | |||
417 | l2cap_sock_kill(sk); | 417 | l2cap_sock_kill(sk); |
418 | } | 418 | } |
419 | 419 | ||
420 | del_timer_sync(&conn->info_timer); | 420 | if (conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_SENT) |
421 | del_timer_sync(&conn->info_timer); | ||
421 | 422 | ||
422 | hcon->l2cap_data = NULL; | 423 | hcon->l2cap_data = NULL; |
423 | kfree(conn); | 424 | kfree(conn); |