Bluetooth: Explicitly stop all timers before frees
As a preventative measure, timers on dynamic memory structures must be
not running, or stopped, prior to freeing. Since it is safe to delete
timers whether running or not, all timers are deleted.
CRs-fixed: 328673
Change-Id: I255d99cb2419fad07caf445920050cf2d05ffe4d
Signed-off-by: Brian Gix <bgix@codeaurora.org>
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 53a9cac..ccf3623 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -1,6 +1,6 @@
/*
BlueZ - Bluetooth protocol stack for Linux
- Copyright (c) 2000-2001, 2010-2011 Code Aurora Forum. All rights reserved.
+ Copyright (c) 2000-2001, 2010-2012 Code Aurora Forum. All rights reserved.
Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
@@ -430,9 +430,10 @@
BT_DBG("%s conn %p handle %d", hdev->name, conn, conn->handle);
+ /* Make sure no timers are running */
del_timer(&conn->idle_timer);
-
del_timer(&conn->disc_timer);
+ del_timer(&conn->smp_timer);
if (conn->type == ACL_LINK) {
struct hci_conn *sco = conn->link;