From: Dave Young Date: Mon, 3 Mar 2008 20:18:55 +0000 (-0800) Subject: [BLUETOOTH]: l2cap info_timer delete fix in hci_conn_del X-Git-Tag: upstream/snapshot3+hdmi~26461^2~179 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e8440f53593b5f9c695f18b493b535873dbb9da;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [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 Acked-by: Marcel Holtmann Signed-off-by: David S. Miller --- diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 7c5459c8..34f8bf9 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) 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);