On Tue, 2017-11-28 at 21:38 +0000, Madhani, Himanshu wrote: > Hi Bart, > > > On Nov 28, 2017, at 11:45 AM, Bart Van Assche <bart.vanassche@xxxxxxx> wrote: > > > > On Tue, 2017-11-28 at 11:34 -0800, Himanshu Madhani wrote: > > > From: Quinn Tran <quinn.tran@xxxxxxxxxx> > > > > Nesting spinlocks is allowed so I think a more detailed description > > is required for this patch. It would help e.g. to explain why this > > patch is a bug fix and also what it fixes. > > > Apology for using wrong subject for this patch. > > we ran into this deadlock issue while unloading driver and stack trace shows following > > #14 [ffff9f2e21e03db8] native_queued_spin_lock_slowpath at ffffffffad0d8802 > #15 [ffff9f2e21e03dc0] do_raw_spin_lock at ffffffffad0d99e4 > #16 [ffff9f2e21e03dd8] _raw_spin_lock_irqsave at ffffffffad652471 > #17 [ffff9f2e21e03e00] qla2x00_els_dcmd_iocb_timeout at ffffffffc070cd63 [qla2xxx] > #18 [ffff9f2e21e03e40] qla2x00_sp_timeout at ffffffffc06f06d3 [qla2xxx] > #19 [ffff9f2e21e03e68] call_timer_fn at ffffffffad0f97d8 > #20 [ffff9f2e21e03ed8] run_timer_softirq at ffffffffad0faf47 > #21 [ffff9f2e21e03f68] __softirqentry_text_start at ffffffffad655f32 > > There is patch #19 (https://patchwork.kernel.org/patch/10080967/) later in this series which ultimately removes > this block of code protected by these spin locks. if you prefer i can merge this patch with the other patch and > add more description Hello Himanshu, Do you enable CONFIG_PROVE_LOCKING in any of your tests? If this bug could be reproduced with CONFIG_PROVE_LOCKING then that would provide very valuable information about the root cause of the deadlock. Thanks, Bart.