public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libsas: fix runaway error handler problem
@ 2011-01-20 23:26 James Bottomley
  0 siblings, 0 replies; only message in thread
From: James Bottomley @ 2011-01-20 23:26 UTC (permalink / raw)
  To: linux-scsi

libsas makes use of scsi_schedule_eh() but forgets to clear the
host_eh_scheduled flag in its error handling routine.  Because of this,
the error handler thread never gets to sleep; it's constantly awake and
trying to run the error routine leading to console spew and inability to
run anything else (at least on a UP system).  The fix is to clear the
flag as we splice the work queue.

James

---

diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index 5815cbe..9a7aaf5 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -646,6 +646,7 @@ void sas_scsi_recover_host(struct Scsi_Host *shost)
 
 	spin_lock_irqsave(shost->host_lock, flags);
 	list_splice_init(&shost->eh_cmd_q, &eh_work_q);
+	shost->host_eh_scheduled = 0;
 	spin_unlock_irqrestore(shost->host_lock, flags);
 
 	SAS_DPRINTK("Enter %s\n", __func__);



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-20 23:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-20 23:26 [PATCH] libsas: fix runaway error handler problem James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox