linux/net/bluetooth
Dave Young 4c71318948 Bluetooth: Remove useless flush_work() causing lockdep warnings
The calls to flush_work() are pointless in a single thread workqueue
and they are actually causing a lockdep warning.

=============================================
[ INFO: possible recursive locking detected ]
2.6.30-rc6-02911-gbb803cf #16
---------------------------------------------
bluetooth/2518 is trying to acquire lock:
 (bluetooth){+.+.+.}, at: [<c0130c14>] flush_work+0x28/0xb0

but task is already holding lock:
 (bluetooth){+.+.+.}, at: [<c0130424>] worker_thread+0x149/0x25e

other info that might help us debug this:
2 locks held by bluetooth/2518:
 #0:  (bluetooth){+.+.+.}, at: [<c0130424>] worker_thread+0x149/0x25e
 #1:  (&conn->work_del){+.+...}, at: [<c0130424>] worker_thread+0x149/0x25e

stack backtrace:
Pid: 2518, comm: bluetooth Not tainted 2.6.30-rc6-02911-gbb803cf #16
Call Trace:
 [<c03d64d9>] ? printk+0xf/0x11
 [<c0140d96>] __lock_acquire+0x7ce/0xb1b
 [<c0141173>] lock_acquire+0x90/0xad
 [<c0130c14>] ? flush_work+0x28/0xb0
 [<c0130c2e>] flush_work+0x42/0xb0
 [<c0130c14>] ? flush_work+0x28/0xb0
 [<f8b84966>] del_conn+0x1c/0x84 [bluetooth]
 [<c0130469>] worker_thread+0x18e/0x25e
 [<c0130424>] ? worker_thread+0x149/0x25e
 [<f8b8494a>] ? del_conn+0x0/0x84 [bluetooth]
 [<c0133843>] ? autoremove_wake_function+0x0/0x33
 [<c01302db>] ? worker_thread+0x0/0x25e
 [<c013355a>] kthread+0x45/0x6b
 [<c0133515>] ? kthread+0x0/0x6b
 [<c01034a7>] kernel_thread_helper+0x7/0x10

Based on a report by Oliver Hartkopp <oliver@hartkopp.net>

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Tested-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2009-05-27 09:15:57 +02:00
..
bnep
cmtp Bluetooth: Remove some pointless conditionals before kfree_skb() 2009-02-27 06:14:49 +01:00
hidp
rfcomm Bluetooth: Fix removing of RFCOMM DLC timer with DEFER_SETUP 2009-04-19 18:56:45 +02:00
af_bluetooth.c Bluetooth: Fix poll() misbehavior when using BT_DEFER_SETUP 2009-02-27 06:14:46 +01:00
hci_conn.c Bluetooth: Don't use hci_acl_connect_cancel() for incoming connections 2009-05-09 18:09:45 -07:00
hci_core.c Bluetooth: Remove some pointless conditionals before kfree_skb() 2009-02-27 06:14:49 +01:00
hci_event.c Bluetooth: Don't trigger disconnect timeout for security mode 3 pairing 2009-05-09 18:09:52 -07:00
hci_sock.c
hci_sysfs.c Bluetooth: Remove useless flush_work() causing lockdep warnings 2009-05-27 09:15:57 +02:00
Kconfig
l2cap.c Bluetooth: Remove some pointless conditionals before kfree_skb() 2009-02-27 06:14:49 +01:00
lib.c
Makefile
sco.c Bluetooth: Ask upper layers for HCI disconnect reason 2009-02-27 06:14:43 +01:00