linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Love <robert.w.love@intel.com>
To: linux-scsi@vger.kernel.org
Cc: Ross Brattain <ross.b.brattain@intel.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	Vasu Dev <vasu.dev@intel.com>
Subject: [PATCH 2/6] libfc: flush lport worker after its disabled
Date: Fri, 20 Apr 2012 12:16:32 -0700	[thread overview]
Message-ID: <20120420191632.4634.60327.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20120420191620.4634.94869.stgit@localhost6.localdomain6>

From: Vasu Dev <vasu.dev@intel.com>

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]  [<ffffffff810403f4>] warn_slowpath_common+0x85/0x9d
 [13192.944940]  [<ffffffff81040426>] warn_slowpath_null+0x1a/0x1c
 [13192.945734]  [<ffffffffa02746eb>] fc_lport_timeout+0x53/0xa9 [libfc]
 [13192.946665]  [<ffffffff81058d88>] process_one_work+0x20c/0x3ad
 [13192.947541]  [<ffffffff81058cbe>] ? process_one_work+0x142/0x3ad
 [13192.948423]  [<ffffffffa0274698>] ? fc_lport_enter_ns+0x178/0x178 [libfc]
 [13192.949363]  [<ffffffff8105a313>] worker_thread+0xfd/0x181
 [13192.950191]  [<ffffffff8105a216>] ? manage_workers.clone.15+0x173/0x173
 [13192.951100]  [<ffffffff8105e19b>] kthread+0xa4/0xac
 [13192.951755]  [<ffffffff814edbb4>] kernel_thread_helper+0x4/0x10
 [13192.952520]  [<ffffffff814e5cb4>] ? retint_restore_args+0x13/0x13
 [13192.953398]  [<ffffffff8105e0f7>] ? __init_kthread_worker+0x5b/0x5b
 [13192.954278]  [<ffffffff814edbb0>] ? gs_change+0x13/0x13
 [13192.954911] ---[ end trace 9763213b95bbd803 ]---

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
---
 drivers/scsi/libfc/fc_lport.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index cc83b66..c1402fb 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;


  parent reply	other threads:[~2012-04-20 19:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 19:16 [PATCH 0/6] libfc, libfcoe and fcoe patches for scsi-misc Robert Love
2012-04-20 19:16 ` [PATCH 1/6] fcoe: remove lport from net device before doing per cpu rx thread cleanup Robert Love
2012-04-20 19:16 ` Robert Love [this message]
2012-04-20 19:16 ` [PATCH 3/6] libfc: defer releasing master lport until complete fcoe interface cleanuped up Robert Love
2012-04-20 19:16 ` [PATCH 4/6] fcoe: Don't hold rtnl_mutex in fcoe_update_src_mac Robert Love
2012-05-10  7:53   ` James Bottomley
2012-04-20 19:16 ` [PATCH 5/6] libfcoe: fix VN2VN N_Port_ID Beacon source MAC Robert Love
2012-04-20 19:16 ` [PATCH 6/6] fcoe: remove a stray unlock Robert Love

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120420191632.4634.60327.stgit@localhost6.localdomain6 \
    --to=robert.w.love@intel.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=ross.b.brattain@intel.com \
    --cc=vasu.dev@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).