• Dave Young's avatar
    Bluetooth: Remove useless flush_work() causing lockdep warnings · 4c713189
    Dave Young authored
    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-gbb803cfb #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-gbb803cfb #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: default avatarDave Young <hidave.darkstar@gmail.com>
    Tested-by: default avatarOliver Hartkopp <oliver@hartkopp.net>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    4c713189
hci_sysfs.c 10.9 KB