From: Jack Morgenstein Subject: Re: 3.6-rc1 IB complaint Date: Wed, 8 Aug 2012 15:08:17 +0300 Message-ID: <201208081508.17663.jackm@dev.mellanox.co.il> References: <502146C1.80405@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <502146C1.80405-HInyCGIudOg@public.gmane.org> Content-Disposition: inline Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Bart Van Assche Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Roland Dreier List-Id: linux-rdma@vger.kernel.org Hi Bart, I submitted a patch to Roland on August 3 (along with SRIOV-IB V2) to fix this: [PATCH] IB/mlx4: fix possible deadlock with sm_lock spinlock I notice that you tested out the fix and it worked. Roland, please take the patch and submit to Linus. This fixes a bug in the upstream 3.6-RC1 code. Thanks! -Jack On Tuesday 07 August 2012 19:48, Bart Van Assche wrote: > Hello, > > Has anyone else already seen the ugly kernel message below ? This > message is generated during boot and prevents my IB HCA to come up > properly with 3.6-rc1. This did not happen with kernel 3.5. > > ================================= > [ INFO: inconsistent lock state ] > 3.6.0-rc1-debug+ #1 Not tainted > --------------------------------- > inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. > swapper/1/0 [HC1[1]:SC0[0]:HE0:SE1] takes: > (&(&ibdev->sm_lock)->rlock){?.+...}, at: [] update_sm_ah+0x94/0xd0 [mlx4_ib] > {HARDIRQ-ON-W} state was registered at: > [] __lock_acquire+0x66a/0x1ca0 > [] lock_acquire+0x95/0x130 > [] _raw_spin_lock+0x45/0x80 > [] mlx4_ib_process_mad+0x58b/0x7a0 [mlx4_ib] > [] ib_post_send_mad+0x34e/0x6d0 [ib_mad] > [] ib_umad_write+0x515/0x630 [ib_umad] > [] vfs_write+0xce/0x170 > [] sys_write+0x54/0xa0 > [] system_call_fastpath+0x16/0x1b > irq event stamp: 306104 > hardirqs last enabled at (306101): [] mwait_idle+0x95/0x180 > hardirqs last disabled at (306102): [] common_interrupt+0x67/0x6c > softirqs last enabled at (306104): [] _local_bh_enable+0x13/0x20 > softirqs last disabled at (306103): [] irq_enter+0x75/0x90 > > other info that might help us debug this: > Possible unsafe locking scenario: > > CPU0 > ---- > lock(&(&ibdev->sm_lock)->rlock); > > lock(&(&ibdev->sm_lock)->rlock); > > *** DEADLOCK *** > > 1 lock held by swapper/1/0: > #0: (&(&priv->ctx_lock)->rlock){-.....}, at: [] mlx4_dispatch_event+0x39/0x90 [mlx4_core] > > stack backtrace: > Pid: 0, comm: swapper/1 Not tainted 3.6.0-rc1-debug+ #1 > Call Trace: > [] print_usage_bug+0x219/0x220 > [] mark_lock+0x36f/0x3f0 > [] __lock_acquire+0x80a/0x1ca0 > [] lock_acquire+0x95/0x130 > [] ? update_sm_ah+0x94/0xd0 [mlx4_ib] > [] ? rdma_port_get_link_layer+0x1b/0x40 [ib_core] > [] _raw_spin_lock+0x45/0x80 > [] ? update_sm_ah+0x94/0xd0 [mlx4_ib] > [] ? ib_create_ah+0x1a/0x40 [ib_core] > [] update_sm_ah+0x94/0xd0 [mlx4_ib] > [] handle_port_mgmt_change_event+0xeb/0x150 [mlx4_ib] > [] mlx4_ib_event+0x120/0x170 [mlx4_ib] > [] ? _raw_spin_lock_irqsave+0x83/0xa0 > [] ? mlx4_dispatch_event+0x39/0x90 [mlx4_core] > [] mlx4_dispatch_event+0x6c/0x90 [mlx4_core] > [] mlx4_eq_int+0x4d0/0x920 [mlx4_core] > [] ? local_clock+0x4f/0x60 > [] mlx4_msi_x_interrupt+0x14/0x20 [mlx4_core] > [] handle_irq_event_percpu+0x75/0x230 > [] handle_irq_event+0x4e/0x80 > [] handle_edge_irq+0x85/0x130 > [] handle_irq+0x25/0x40 > [] do_IRQ+0x5d/0xe0 > [] common_interrupt+0x6c/0x6c > [] ? mwait_idle+0x9e/0x180 > [] ? mwait_idle+0x95/0x180 > [] cpu_idle+0xa6/0xe0 > [] start_secondary+0x204/0x206 > -- > 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 > -- 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