Commit c131993b authored by Matthew Wilcox's avatar Matthew Wilcox Committed by James Bottomley

[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: default avatarMatthew Wilcox <matthew@wil.cx>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 1bd40573
...@@ -166,6 +166,7 @@ static int qlogicfas_release(struct Scsi_Host *shost) ...@@ -166,6 +166,7 @@ static int qlogicfas_release(struct Scsi_Host *shost)
{ {
struct qlogicfas408_priv *priv = get_priv_by_host(shost); struct qlogicfas408_priv *priv = get_priv_by_host(shost);
scsi_remove_host(shost);
if (shost->irq) { if (shost->irq) {
qlogicfas408_disable_ints(priv); qlogicfas408_disable_ints(priv);
free_irq(shost->irq, shost); free_irq(shost->irq, shost);
...@@ -174,7 +175,6 @@ static int qlogicfas_release(struct Scsi_Host *shost) ...@@ -174,7 +175,6 @@ static int qlogicfas_release(struct Scsi_Host *shost)
free_dma(shost->dma_channel); free_dma(shost->dma_channel);
if (shost->io_port && shost->n_io_port) if (shost->io_port && shost->n_io_port)
release_region(shost->io_port, shost->n_io_port); release_region(shost->io_port, shost->n_io_port);
scsi_remove_host(shost);
scsi_host_put(shost); scsi_host_put(shost);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment