From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bart Van Assche Subject: v3.7: Unloading ib_ipoib triggers circular locking dependency complaint Date: Fri, 23 Nov 2012 13:10:45 +0100 Message-ID: <50AF67C5.7090200@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: linux-rdma@vger.kernel.org Hello, Apparently unloading the ib_ipoib kernel module triggers a circular locking dependency complaint. Has anyone already been looking into this ? Thanks, Bart. ====================================================== [ INFO: possible circular locking dependency detected ] 3.7.0-rc6-debug+ #1 Not tainted ------------------------------------------------------- rmmod/1414 is trying to acquire lock: (s_active#72){++++.+}, at: [] sysfs_addrm_finish+0x3b/0x70 but task is already holding lock: (rtnl_mutex){+.+.+.}, at: [] rtnl_lock+0x17/0x20 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (rtnl_mutex){+.+.+.}: [] lock_acquire+0x8a/0x120 [] mutex_lock_nested+0x79/0x360 [] rtnl_lock+0x17/0x20 [] ipoib_set_mode+0xde/0xf0 [ib_ipoib] [] set_mode+0x3a/0x90 [ib_ipoib] [] dev_attr_store+0x18/0x30 [] sysfs_write_file+0xe0/0x150 [] vfs_write+0xab/0x170 [] sys_write+0x55/0xa0 [] system_call_fastpath+0x16/0x1b -> #0 (s_active#72){++++.+}: [] __lock_acquire+0x1b9c/0x1c90 [] lock_acquire+0x8a/0x120 [] sysfs_deactivate+0x126/0x180 [] sysfs_addrm_finish+0x3b/0x70 [] sysfs_remove_dir+0x9f/0xd0 [] kobject_del+0x16/0x40 [] device_del+0x17c/0x1c0 [] netdev_unregister_kobject+0x67/0x80 [] rollback_registered_many+0x16a/0x210 [] rollback_registered+0x31/0x40 [] unregister_netdevice_queue+0x58/0xa0 [] unregister_netdev+0x20/0x30 [] ipoib_remove_one+0xb1/0xf0 [ib_ipoib] [] ib_unregister_client+0x4e/0x100 [ib_core] [] ipoib_cleanup_module+0x15/0x34 [ib_ipoib] [] sys_delete_module+0x14b/0x2b0 [] system_call_fastpath+0x16/0x1b other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rtnl_mutex); lock(s_active#72); lock(rtnl_mutex); lock(s_active#72); *** DEADLOCK *** 2 locks held by rmmod/1414: #0: (device_mutex){+.+.+.}, at: [] ib_unregister_client+0x27/0x100 [ib_core] #1: (rtnl_mutex){+.+.+.}, at: [] rtnl_lock+0x17/0x20 stack backtrace: Pid: 1414, comm: rmmod Not tainted 3.7.0-rc6-debug+ #1 Call Trace: [] print_circular_bug+0x1fb/0x20c [] __lock_acquire+0x1b9c/0x1c90 [] ? sched_clock_local+0x25/0xa0 [] lock_acquire+0x8a/0x120 [] ? sysfs_addrm_finish+0x3b/0x70 [] sysfs_deactivate+0x126/0x180 [] ? sysfs_addrm_finish+0x3b/0x70 [] ? mark_held_locks+0xb2/0x130 [] sysfs_addrm_finish+0x3b/0x70 [] sysfs_remove_dir+0x9f/0xd0 [] kobject_del+0x16/0x40 [] device_del+0x17c/0x1c0 [] netdev_unregister_kobject+0x67/0x80 [] rollback_registered_many+0x16a/0x210 [] rollback_registered+0x31/0x40 [] unregister_netdevice_queue+0x58/0xa0 [] unregister_netdev+0x20/0x30 [] ipoib_remove_one+0xb1/0xf0 [ib_ipoib] [] ib_unregister_client+0x4e/0x100 [ib_core] [] ipoib_cleanup_module+0x15/0x34 [ib_ipoib] [] sys_delete_module+0x14b/0x2b0 [] ? trace_hardirqs_on_thunk+0x3a/0x3f [] system_call_fastpath+0x16/0x1b -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html