From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932614Ab1IHM0w (ORCPT ); Thu, 8 Sep 2011 08:26:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58528 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932592Ab1IHM0u (ORCPT ); Thu, 8 Sep 2011 08:26:50 -0400 Date: Thu, 8 Sep 2011 08:26:30 -0400 From: Josh Boyer To: dwmw2@infradead.org Cc: Carolyn Wyborny , linux-kernel@vger.kernel.org, e1000-devel@lists.sourceforge.net Subject: 3.1-rc3 iommu lockdep trace Message-ID: <20110908122630.GL10700@zod.bos.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi All, We have a report[1] of a lockdep trace from the iommu layer when doing a rmmod of the igb driver. Any thoughts? josh [1] https://bugzilla.redhat.com/show_bug.cgi?id=736676 [ 239.085163] ======================================================= [ 239.093461] [ INFO: possible circular locking dependency detected ] [ 239.099997] 3.1.0-0.rc3.git0.0.fc16.x86_64 #1 [ 239.104621] ------------------------------------------------------- [ 239.111154] rmmod/5903 is trying to acquire lock: [ 239.116125] (&(&iommu->lock)->rlock){......}, at: [] domain_remove_one_dev_info+0x1c1/0x20b [ 239.126818] [ 239.126818] but task is already holding lock: [ 239.133204] (device_domain_lock){-.-...}, at: [] domain_remove_one_dev_info+0x132/0x20b [ 239.143552] [ 239.143552] which lock already depends on the new lock. [ 239.143553] [ 239.152565] [ 239.152565] the existing dependency chain (in reverse order) is: [ 239.160595] [ 239.160596] -> #1 (device_domain_lock){-.-...}: [ 239.167355] [] lock_acquire+0xf3/0x13e [ 239.173605] [] _raw_spin_lock_irqsave+0x54/0x8e [ 239.180640] [] domain_context_mapping_one+0x2b7/0x49a [ 239.188419] [] domain_context_mapping+0x3d/0xe5 [ 239.195445] [] iommu_prepare_identity_map+0x18f/0x1ae [ 239.203226] [] intel_iommu_init+0x7f0/0xa9d [ 239.209906] [] pci_iommu_init+0x29/0x54 [ 239.216243] [] do_one_initcall+0x7f/0x13a [ 239.222750] [] kernel_init+0xdf/0x159 [ 239.228914] [] kernel_thread_helper+0x4/0x10 [ 239.235691] [ 239.235691] -> #0 (&(&iommu->lock)->rlock){......}: [ 239.242786] [] __lock_acquire+0xa1a/0xcf7 [ 239.249295] [] lock_acquire+0xf3/0x13e [ 239.255544] [] _raw_spin_lock_irqsave+0x54/0x8e [ 239.262580] [] domain_remove_one_dev_info+0x1c1/0x20b [ 239.270360] [] device_notifier+0x54/0x7e [ 239.276789] [] notifier_call_chain+0x84/0xbb [ 239.283557] [] __blocking_notifier_call_chain+0x67/0x84 [ 239.291501] [] blocking_notifier_call_chain+0x14/0x16 [ 239.299271] [] __device_release_driver+0xcd/0xd2 [ 239.306394] [] driver_detach+0x99/0xc2 [ 239.312651] [] bus_remove_driver+0xba/0xdf [ 239.319247] [] driver_unregister+0x6a/0x75 [ 239.325840] [] pci_unregister_driver+0x44/0x8d [ 239.332781] [] igb_exit_module+0x1c/0x1e [igb] [ 239.339731] [] sys_delete_module+0x1dd/0x251 [ 239.346499] [] system_call_fastpath+0x16/0x1b [ 239.353354] [ 239.353354] other info that might help us debug this: [ 239.353355] [ 239.362195] Possible unsafe locking scenario: [ 239.362196] [ 239.368669] CPU0 CPU1 [ 239.373467] ---- ---- [ 239.378265] lock(device_domain_lock); [ 239.382500] lock(&(&iommu->lock)->rlock); [ 239.389585] lock(device_domain_lock); [ 239.396338] lock(&(&iommu->lock)->rlock); [ 239.400909] [ 239.400910] *** DEADLOCK *** [ 239.400910] [ 239.407670] 4 locks held by rmmod/5903: [ 239.411776] #0: (&__lockdep_no_validate__){......}, at: [] driver_detach+0x7a/0xc2 [ 239.421826] #1: (&__lockdep_no_validate__){......}, at: [] driver_detach+0x88/0xc2 [ 239.431879] #2: (&(&priv->bus_notifier)->rwsem){.+.+.+}, at: [] __blocking_notifier_call_chain+0x4f/0x84 [ 239.443850] #3: (device_domain_lock){-.-...}, at: [] domain_remove_one_dev_info+0x132/0x20b [ 239.454690] [ 239.454691] stack backtrace: [ 239.459600] Pid: 5903, comm: rmmod Tainted: G W 3.1.0-0.rc3.git0.0.fc16.x86_64 #1 [ 239.468356] Call Trace: [ 239.471072] [] print_circular_bug+0x1f8/0x209 [ 239.477345] [] __lock_acquire+0xa1a/0xcf7 [ 239.483275] [] ? __slab_free+0x166/0x24c [ 239.489119] [] ? domain_remove_one_dev_info+0x1c1/0x20b [ 239.496257] [] lock_acquire+0xf3/0x13e [ 239.501920] [] ? domain_remove_one_dev_info+0x1c1/0x20b [ 239.509059] [] _raw_spin_lock_irqsave+0x54/0x8e [ 239.515506] [] ? domain_remove_one_dev_info+0x1c1/0x20b [ 239.522645] [] ? trace_hardirqs_off+0xd/0xf [ 239.528749] [] domain_remove_one_dev_info+0x1c1/0x20b [ 239.535716] [] device_notifier+0x54/0x7e [ 239.541558] [] notifier_call_chain+0x84/0xbb [ 239.547747] [] __blocking_notifier_call_chain+0x67/0x84 [ 239.554886] [] blocking_notifier_call_chain+0x14/0x16 [ 239.561854] [] __device_release_driver+0xcd/0xd2 [ 239.568387] [] driver_detach+0x99/0xc2 [ 239.574056] [] bus_remove_driver+0xba/0xdf [ 239.580073] [] driver_unregister+0x6a/0x75 [ 239.591871] [] pci_unregister_driver+0x44/0x8d [ 239.598236] [] igb_exit_module+0x1c/0x1e [igb] [ 239.604594] [] sys_delete_module+0x1dd/0x251 [ 239.610783] [] ? retint_swapgs+0x13/0x1b [ 239.616630] [] ? audit_syscall_entry+0x11c/0x148 [ 239.623162] [] ? trace_hardirqs_on_thunk+0x3a/0x3f [ 239.629871] [] ? pmd_offset+0x19/0x3f [ 239.635451] [] system_call_fastpath+0x16/0x1b