From: Vasu Dev Date: Fri, 20 Apr 2012 19:16:32 +0000 (-0700) Subject: [SCSI] libfc: flush lport worker after its disabled X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=061446a159c5a0ec7047f9979866ffa7e0587b25;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [SCSI] libfc: flush lport worker after its disabled The lport could get timeout armed while its getting disabled, so flush lport worker after its disabled and ignore lport retry in that case instead of WARN_ON. [13192.936858] WARNING: at drivers/scsi/libfc/fc_lport.c:1573 fc_lport_timeout+0x53/0xa9 [libfc]() [13192.938026] Hardware name: Bochs [13192.938620] Modules linked in: fcoe libfcoe libfc scsi_transport_fc scsi_tgt fuse 8021q garp stp llc sunrpc ipv6 uinput microcode joydev pcspkr ixgbe e1000 i2c_piix4 i2c_core virtio_balloon dca mdio virtio_blk virtio_pci virtio_ring virtio floppy [last unloaded: speedstep_lib] [13192.942589] Pid: 23605, comm: kworker/0:6 Tainted: G W 3.2.0+ #71 [13192.943587] Call Trace: [13192.944052] [] warn_slowpath_common+0x85/0x9d [13192.944940] [] warn_slowpath_null+0x1a/0x1c [13192.945734] [] fc_lport_timeout+0x53/0xa9 [libfc] [13192.946665] [] process_one_work+0x20c/0x3ad [13192.947541] [] ? process_one_work+0x142/0x3ad [13192.948423] [] ? fc_lport_enter_ns+0x178/0x178 [libfc] [13192.949363] [] worker_thread+0xfd/0x181 [13192.950191] [] ? manage_workers.clone.15+0x173/0x173 [13192.951100] [] kthread+0xa4/0xac [13192.951755] [] kernel_thread_helper+0x4/0x10 [13192.952520] [] ? retint_restore_args+0x13/0x13 [13192.953398] [] ? __init_kthread_worker+0x5b/0x5b [13192.954278] [] ? gs_change+0x13/0x13 [13192.954911] ---[ end trace 9763213b95bbd803 ]--- Signed-off-by: Vasu Dev Acked-by: Neil Horman Tested-by: Ross Brattain Signed-off-by: Robert Love Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index ef9560dff295..fb6610b249e1 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c @@ -648,6 +648,7 @@ int fc_lport_destroy(struct fc_lport *lport) lport->tt.fcp_abort_io(lport); lport->tt.disc_stop_final(lport); lport->tt.exch_mgr_reset(lport, 0, 0); + cancel_delayed_work_sync(&lport->retry_work); fc_fc4_del_lport(lport); return 0; } @@ -1564,7 +1565,6 @@ static void fc_lport_timeout(struct work_struct *work) switch (lport->state) { case LPORT_ST_DISABLED: - WARN_ON(1); break; case LPORT_ST_READY: break;