All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: linux-scsi@vger.kernel.org
Subject: sym2 error handler sleeps with irqs off
Date: Fri, 11 Jul 2003 16:20:46 +1000	[thread overview]
Message-ID: <20030711062045.GA9236@krispykreme> (raw)


Hi,

The scsi error handler calls driver error handlers with the host_lock
taken. We need to drop it before calling down() in the sym2 driver.

Anton

===== drivers/scsi/sym53c8xx_2/sym_glue.c 1.13 vs edited =====
--- 1.13/drivers/scsi/sym53c8xx_2/sym_glue.c	Fri Feb  7 19:20:34 2003
+++ edited/drivers/scsi/sym53c8xx_2/sym_glue.c	Thu Feb 13 00:00:21 2003
@@ -1112,6 +1112,7 @@
 	int sts = -1;
 	struct sym_eh_wait eh, *ep = &eh;
 	char devname[20];
+	unsigned long flags;
 
 	sprintf(devname, "%s:%d:%d", sym_name(np), cmd->device->id, cmd->device->lun);
 
@@ -1203,7 +1204,11 @@
 		ep->timer.data = (u_long)cmd;
 		ep->timed_out = 1;	/* Be pessimistic for once :) */
 		add_timer(&ep->timer);
+		local_save_flags(flags);
+		spin_unlock_irq(cmd->device->host->host_lock);
 		down(&ep->sem);
+		local_irq_restore(flags);
+		spin_lock(cmd->device->host->host_lock);
 		if (ep->timed_out)
 			sts = -2;
 	}

             reply	other threads:[~2003-07-11  6:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-11  6:20 Anton Blanchard [this message]
2003-07-13 13:35 ` sym2 error handler sleeps with irqs off Christoph Hellwig

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=20030711062045.GA9236@krispykreme \
    --to=anton@samba.org \
    --cc=linux-scsi@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.