linux-hardened/net/bluetooth
Thomas Gleixner b77dcf8460 Bluetooth: Fix warning with hci_cmd_timer
After we made debugobjects working again, we got the following:

WARNING: at lib/debugobjects.c:262 debug_print_object+0x8e/0xb0()
Hardware name: System Product Name
ODEBUG: free active (active state 0) object type: timer_list hint: hci_cmd_timer+0x0/0x60
Pid: 2125, comm: dmsetup Tainted: G        W   2.6.38-06707-gc62b389 #110375
Call Trace:
 [<ffffffff8104700a>] warn_slowpath_common+0x7a/0xb0
 [<ffffffff810470b6>] warn_slowpath_fmt+0x46/0x50
 [<ffffffff812d3a5e>] debug_print_object+0x8e/0xb0
 [<ffffffff81bd8810>] ? hci_cmd_timer+0x0/0x60
 [<ffffffff812d4685>] debug_check_no_obj_freed+0x125/0x230
 [<ffffffff810f1063>] ? check_object+0xb3/0x2b0
 [<ffffffff810f3630>] kfree+0x150/0x190
 [<ffffffff81be4d06>] ? bt_host_release+0x16/0x20
 [<ffffffff81be4d06>] bt_host_release+0x16/0x20
 [<ffffffff813a1907>] device_release+0x27/0xa0
 [<ffffffff812c519c>] kobject_release+0x4c/0xa0
 [<ffffffff812c5150>] ? kobject_release+0x0/0xa0
 [<ffffffff812c61f6>] kref_put+0x36/0x70
 [<ffffffff812c4d37>] kobject_put+0x27/0x60
 [<ffffffff813a21f7>] put_device+0x17/0x20
 [<ffffffff81bda4f9>] hci_free_dev+0x29/0x30
 [<ffffffff81928be6>] vhci_release+0x36/0x70
 [<ffffffff810fb366>] fput+0xd6/0x1f0
 [<ffffffff810f8fe6>] filp_close+0x66/0x90
 [<ffffffff810f90a9>] sys_close+0x99/0xf0
 [<ffffffff81d4c96b>] system_call_fastpath+0x16/0x1b

That timer was introduced with commit 6bd32326cda(Bluetooth: Use
proper timer for hci command timout)

Timer seems to be running when the thing is closed. Removing the timer
unconditionally fixes the problem. And yes, it needs to be fixed
before the HCI_UP check.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-03-24 17:04:44 -03:00
..
bnep Bluetooth: remove l2cap_load() hack 2011-02-15 09:45:52 -03:00
cmtp Bluetooth: remove l2cap_load() hack 2011-02-15 09:45:52 -03:00
hidp Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2011-03-18 10:35:30 -07:00
rfcomm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2011-03-16 16:29:25 -07:00
af_bluetooth.c Bluetooth: remove unnecessary call to hci_sock_cleanup 2011-02-25 22:36:58 -03:00
hci_conn.c Bluetooth: Use ERR_PTR as return error from hci_connect 2011-02-27 17:11:29 -03:00
hci_core.c Bluetooth: Fix warning with hci_cmd_timer 2011-03-24 17:04:44 -03:00
hci_event.c Bluetooth: Fix HCI_RESET command synchronization 2011-03-24 17:04:44 -03:00
hci_sock.c Bluetooth: fix build break on hci_sock.c 2011-02-22 08:43:52 -03:00
hci_sysfs.c Bluetooth: Fix errors reported by checkpatch.pl 2011-02-17 19:22:19 -03:00
Kconfig Bluetooth: Fix BT_L2CAP and BT_SCO in Kconfig 2011-02-28 14:06:53 -05:00
l2cap_core.c Bluetooth: Increment unacked_frames count only the first transmit 2011-03-24 17:04:43 -03:00
l2cap_sock.c Bluetooth: delete hanging L2CAP channel 2011-03-24 17:04:44 -03:00
lib.c Bluetooth: make batostr() print in the right order 2010-10-12 12:44:52 -03:00
Makefile Bluetooth: Merge L2CAP and SCO modules into bluetooth.ko 2011-02-14 17:27:36 -03:00
mgmt.c Bluetooth: Fix missing hci_dev_lock_bh in user_confirm_reply 2011-03-24 17:04:44 -03:00
sco.c Bluetooth: Use ERR_PTR as return error from hci_connect 2011-02-27 17:11:29 -03:00