lkml.org 
[lkml]   [2008]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 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 hci_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>

---
net/bluetooth/l2cap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff -upr linux/net/bluetooth/l2cap.c linux.new/net/bluetooth/l2cap.c
--- linux/net/bluetooth/l2cap.c 2008-03-03 10:35:03.000000000 +0800
+++ linux.new/net/bluetooth/l2cap.c 2008-03-03 10:36:34.000000000 +0800
@@ -417,7 +417,8 @@ static void l2cap_conn_del(struct hci_co
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);

\
 
 \ /
  Last update: 2008-03-03 03:45    [W:0.054 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site