Created attachment 23688 [details] kernel config Got this lockdep warning while putting my Dell Latitude D630 into the docking station (while it was running): No idea if this is really ACPI-related, bugzilla just asked me to put a label on it. cheers Dariush ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.32-rc6-00035-g8b17a4f #1 ------------------------------------------------------- kacpi_hotplug/246 is trying to acquire lock: (kacpid){+.+.+.}, at: [<ffffffff8105bbd0>] flush_workqueue+0x0/0xb0 but task is already holding lock: (&dpc->work){+.+.+.}, at: [<ffffffff8105abe9>] worker_thread+0x189/0x310 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&dpc->work){+.+.+.}: [<ffffffff8107382e>] __lock_acquire+0x135e/0x1ce0 [<ffffffff8107420c>] lock_acquire+0x5c/0x80 [<ffffffff8105ac35>] worker_thread+0x1d5/0x310 [<ffffffff8105f3a6>] kthread+0x96/0xa0 [<ffffffff8100c39a>] child_rip+0xa/0x20 -> #0 (kacpid){+.+.+.}: [<ffffffff8107415d>] __lock_acquire+0x1c8d/0x1ce0 [<ffffffff8107420c>] lock_acquire+0x5c/0x80 [<ffffffff8105bc1e>] flush_workqueue+0x4e/0xb0 [<ffffffff812dfe59>] acpi_os_wait_events_complete+0x10/0x1e [<ffffffff812dfe84>] acpi_os_execute_deferred+0x1d/0x31 [<ffffffff8105ac3b>] worker_thread+0x1db/0x310 [<ffffffff8105f3a6>] kthread+0x96/0xa0 [<ffffffff8100c39a>] child_rip+0xa/0x20 other info that might help us debug this: 2 locks held by kacpi_hotplug/246: #0: (kacpi_hotplug){+.+...}, at: [<ffffffff8105abe9>] worker_thread+0x189/0x310 #1: (&dpc->work){+.+.+.}, at: [<ffffffff8105abe9>] worker_thread+0x189/0x310 stack backtrace: Pid: 246, comm: kacpi_hotplug Not tainted 2.6.32-rc6-00035-g8b17a4f #1 Call Trace: [<ffffffff81071e60>] print_circular_bug+0x100/0x110 [<ffffffff8107415d>] __lock_acquire+0x1c8d/0x1ce0 [<ffffffff810701bb>] ? add_lock_to_list+0x5b/0xe0 [<ffffffff810738ca>] ? __lock_acquire+0x13fa/0x1ce0 [<ffffffff810715ed>] ? trace_hardirqs_on_caller+0x14d/0x1a0 [<ffffffff810410df>] ? finish_task_switch+0x6f/0x100 [<ffffffff812dfe67>] ? acpi_os_execute_deferred+0x0/0x31 [<ffffffff8107420c>] lock_acquire+0x5c/0x80 [<ffffffff8105bbd0>] ? flush_workqueue+0x0/0xb0 [<ffffffff8105bc1e>] flush_workqueue+0x4e/0xb0 [<ffffffff8105bbd0>] ? flush_workqueue+0x0/0xb0 [<ffffffff812dfe59>] acpi_os_wait_events_complete+0x10/0x1e [<ffffffff812dfe84>] acpi_os_execute_deferred+0x1d/0x31 [<ffffffff8105ac3b>] worker_thread+0x1db/0x310 [<ffffffff8105abe9>] ? worker_thread+0x189/0x310 [<ffffffff8104396f>] ? try_to_wake_up+0xaf/0x220 [<ffffffff8105f720>] ? autoremove_wake_function+0x0/0x40 [<ffffffff8107164d>] ? trace_hardirqs_on+0xd/0x10 [<ffffffff8105aa60>] ? worker_thread+0x0/0x310 [<ffffffff8105f3a6>] kthread+0x96/0xa0 [<ffffffff8100c39a>] child_rip+0xa/0x20 [<ffffffff8100bd3c>] ? restore_args+0x0/0x30 [<ffffffff8105f310>] ? kthread+0x0/0xa0 [<ffffffff8100c390>] ? child_rip+0x0/0x20 ACPI: \_SB_.PCI0.PCIE.GDCK - docking
Created attachment 23689 [details] complete dmesg output
here is the call trace when a dock is plugged: in kacpi_notify_wq: acpi_bus_notify->blocking_notifier_call_chain->acpi_dock_notifier_call->acpi_os_hotplug_execute then kacpi_hp_wq is running: acpi_os_execute_hp_deferred->acpi_os_wait_events_complete->flush_workqueue(kacpi_notify_wq) so you're right that this is a circular locking issue.
(In reply to comment #2) > > so you're right that this is a circular locking issue. hmm, it's okay to flush kacpi_notify_wq in kacpi_hotplug_wq. please ignore the last comment.
Created attachment 24127 [details] patch to fix the issue attached patch should fix the issue
patch has been sent to acpi mail list. http://patchwork.kernel.org/patch/66409/ http://patchwork.kernel.org/patch/66412/ Dariush, could you please give the patch at comment#4 a try?
Will do. I have no access to the docking station until the new year, I'll report back then. Thanks and happy holidays!
Yes, the patch removes the lockdep warning (tested on top of 2.6.32).
applied http://patchwork.kernel.org/patch/66412/ to acpi tree
commit bc73675b99fd9850dd914be01d71af99c5d2a1ae Author: Zhang Rui <rui.zhang@intel.com> Date: Mon Mar 22 15:48:54 2010 +0800 ACPI: fixes a false alarm from lockdep fixes a false alarm from lockdep, as acpi hotplug workqueue waits other workqueues. http://bugzilla.kernel.org/show_bug.cgi?id=14553 https://bugzilla.kernel.org/show_bug.cgi?id=15521 Original-patch-from: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> shipped in 2.6.34-rc4 closed