summaryrefslogtreecommitdiff
path: root/drivers/scsi/qlogicfas.c
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2007-08-15 12:56:59 -0600
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:51:26 -0400
commitc131993b4cbfb6d564619e609b3d0b471ec52c5d (patch)
treecac0a3b5709684ac4a07d6a86efa2622d5f0a10b /drivers/scsi/qlogicfas.c
parent1bd405734651c9ebd1c872a452614f9fe381c673 (diff)
[SCSI] qlogicfas: Close narrow race in release
We were releasing the IRQ before removing the host, so commands could still be coming in which would never be seen by the interrupt handler. Just remove the host before releasing the IRQ to close this race. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qlogicfas.c')
-rw-r--r--drivers/scsi/qlogicfas.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qlogicfas.c b/drivers/scsi/qlogicfas.c
index 94baca840efe..1e874f1fb5c6 100644
--- a/drivers/scsi/qlogicfas.c
+++ b/drivers/scsi/qlogicfas.c
@@ -166,6 +166,7 @@ static int qlogicfas_release(struct Scsi_Host *shost)
{
struct qlogicfas408_priv *priv = get_priv_by_host(shost);
+ scsi_remove_host(shost);
if (shost->irq) {
qlogicfas408_disable_ints(priv);
free_irq(shost->irq, shost);
@@ -174,7 +175,6 @@ static int qlogicfas_release(struct Scsi_Host *shost)
free_dma(shost->dma_channel);
if (shost->io_port && shost->n_io_port)
release_region(shost->io_port, shost->n_io_port);
- scsi_remove_host(shost);
scsi_host_put(shost);
return 0;