Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752637Ab3GFSDQ (ORCPT ); Sat, 6 Jul 2013 14:03:16 -0400 Received: from mail-ea0-f169.google.com ([209.85.215.169]:64903 "EHLO mail-ea0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751662Ab3GFSDN (ORCPT ); Sat, 6 Jul 2013 14:03:13 -0400 Message-ID: <51D85BDE.4000703@gmail.com> Date: Sat, 06 Jul 2013 20:03:10 +0200 From: Maarten Lankhorst User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: Sarah Sharp , Greg Kroah-Hartman CC: LKML , linux-usb@vger.kernel.org Subject: inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage with hcd_urb_list_lock Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4093 Lines: 89 I didn't even know I still had lockdep on. The following lockdep splat happened when I plugged in a usb bluetooth dongle, using the pre-rc1 3.11 kernel at HEAD b2c311075db ================================= [ INFO: inconsistent lock state ] 3.10.0+ #106 Not tainted --------------------------------- inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. irq/42-xhci_hcd/97 [HC0[0]:SC0[2]:HE1:SE0] takes: (hcd_urb_list_lock){?.....}, at: [] usb_hcd_unlink_urb_from_ep+0x28/0x4e {IN-HARDIRQ-W} state was registered at: [] __lock_acquire+0x861/0x1c2e [] lock_acquire+0x87/0x139 [] _raw_spin_lock+0x3b/0x4a [] usb_hcd_unlink_urb_from_ep+0x28/0x4e [] ehci_urb_done+0x5b/0x9c [] qh_completions+0x311/0x3ca [] ehci_handle_intr_unlinks+0xad/0x143 [] ehci_hrtimer_func+0x6b/0xbd [] __run_hrtimer+0x61/0x1f9 [] hrtimer_interrupt+0x10a/0x253 [] local_apic_timer_interrupt+0x38/0x5e [] smp_apic_timer_interrupt+0x46/0x5b [] apic_timer_interrupt+0x6f/0x80 irq event stamp: 224 hardirqs last enabled at (224): [] __slab_free+0x1c7/0x2ed hardirqs last disabled at (223): [] __slab_free+0x139/0x2ed softirqs last enabled at (206): [] irq_forced_thread_fn+0x49/0x5a softirqs last disabled at (212): [] irq_forced_thread_fn+0x24/0x5a other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(hcd_urb_list_lock); lock(hcd_urb_list_lock); *** DEADLOCK *** 1 lock held by irq/42-xhci_hcd/97: #0: (&(&xhci->lock)->rlock){+.-...}, at: [] xhci_irq+0x2f/0x143d stack backtrace: CPU: 1 PID: 97 Comm: irq/42-xhci_hcd Not tainted 3.10.0+ #106 Hardware name: Acer Aspire M3985/Aspire M3985, BIOS P01-A1 03/12/2012 ffffffff8210c150 ffff88040834da48 ffffffff81691af4 0000000000000007 ffff8804082e20b0 ffff88040834daa8 ffffffff8168cb10 0000000000000002 ffff880400000001 ffff880400000000 ffffffff8100f4f7 ffff88040834dac4 Call Trace: [] dump_stack+0x4f/0x84 [] print_usage_bug+0x1f5/0x206 [] ? save_stack_trace+0x2f/0x50 [] mark_lock+0x276/0x2cf [] ? check_usage_forwards+0x12f/0x12f [] __lock_acquire+0x5c0/0x1c2e [] ? mark_held_locks+0x6d/0x117 [] ? __slab_free+0x1c7/0x2ed [] ? trace_hardirqs_on_caller+0xac/0x1bb [] ? trace_hardirqs_on+0xd/0xf [] ? usb_hcd_unlink_urb_from_ep+0x28/0x4e [] lock_acquire+0x87/0x139 [] ? usb_hcd_unlink_urb_from_ep+0x28/0x4e [] _raw_spin_lock+0x3b/0x4a [] ? usb_hcd_unlink_urb_from_ep+0x28/0x4e [] usb_hcd_unlink_urb_from_ep+0x28/0x4e [] xhci_irq+0x5ac/0x143d [] ? _raw_spin_unlock_irq+0x3b/0x5d [] ? finish_task_switch+0x7c/0x101 [] ? finish_task_switch+0x3f/0x101 [] ? __schedule+0x42a/0x885 [] ? irq_thread_fn+0x48/0x48 [] xhci_msi_irq+0x11/0x15 [] irq_forced_thread_fn+0x2e/0x5a [] irq_thread+0x10e/0x131 [] ? irq_finalize_oneshot.part.33+0xe0/0xe0 [] ? wake_threads_waitq+0x44/0x44 [] kthread+0xea/0xef [] ? flush_kthread_work+0x19c/0x19c [] ret_from_fork+0x7c/0xb0 [] ? flush_kthread_work+0x19c/0x19c -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/