Lockdep warning is seen when driver is handling a topology change
event after drive removal.
Starting queue eventually enables irq, which throws lockdep warning in
scsi_request_fn. This change makes starting queues async.
[ cut here ]
WARNING: CPU: 0 PID: 0 at kernel/lockdep.c:2593
trace_hardirqs_on_caller+0x1bc/0x1d0()
DEBUG_LOCKS_WARN_ON(current->hardirq_context)
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G O 3.11.10-dbg-DEV #1
Hardware name: Intel Grantley,Wellsburg/Ixion_QC_15, BIOS 2.50.0 01/21/2016
881fff803b28 a4ea1bd5 881fff803b78
a491bdcc 881fff803b68 a48ae464 cc6405a0
a4805a50 881f9b3ae000
Call Trace:
[] dump_stack+0x68/0x91
[] ? trace_hardirqs_on_caller+0x1bc/0x1d0
[] warn_slowpath_common+0x94/0xc0
[] ? _raw_spin_unlock_irq+0x30/0x50
[] warn_slowpath_fmt+0x46/0x50
[] trace_hardirqs_on_caller+0x1bc/0x1d0
[] trace_hardirqs_on+0xd/0x10
[] _raw_spin_unlock_irq+0x30/0x50
[] scsi_request_fn+0xaf/0x720
[] __blk_run_queue+0x37/0x50
[] blk_start_queue+0x3e/0x80
[] scsi_internal_device_unblock+0x3f/0x90
[] _scsih_ublock_io_device+0x87/0xd0 [mpt2sas]
[] _scsih_tm_tr_send+0x185/0x340 [mpt2sas]
[] mpt2sas_scsih_event_callback+0x3e0/0x840 [mpt2sas]
[] _base_interrupt+0x2fa/0x950 [mpt2sas]
[] ? trace_hardirqs_on_caller+0xab/0x1d0
[] ? trace_hardirqs_on+0xd/0x10
[] handle_irq_event_percpu+0x74/0x230
[] handle_irq_event+0x48/0x70
[] ? handle_edge_irq+0x1e/0x110
[] handle_edge_irq+0x77/0x110
[] handle_irq+0x22/0x40
[] do_IRQ+0x7f/0x110
[] common_interrupt+0x6f/0x6f
[] ? __cpuidle_enter_state+0x7c/0x120
[] ? __cpuidle_enter_state+0x77/0x120
[] cpuidle_enter_state+0xd5/0x250
[] cpu_startup_entry+0xb8/0x1e0
[] rest_init+0xd6/0xe0
[] ? rest_init+0x5/0xe0
[] start_kernel+0x3ed/0x3fa
[] ? repair_env_string+0x5e/0x5e
[] x86_64_start_reservations+0x2a/0x2c
[] x86_64_start_kernel+0x109/0x10d
---[ end trace 46d48ef4760a5d9c ]--
Signed-off-by: Vikram Auradkar
---
drivers/scsi/scsi_lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index e9b4f279d29c..72c90233f261 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -3178,7 +3178,7 @@ void scsi_start_queue(struct scsi_device *sdev)
blk_mq_unquiesce_queue(q);
} else {
spin_lock_irqsave(q->queue_lock, flags);
- blk_start_queue(q);
+ blk_start_queue_async(q);
spin_unlock_irqrestore(q->queue_lock, flags);
}
}
--
2.17.0.441.gb46fe60e1d-goog