Skip to content

Commit

Permalink
[SCSI] qlogicfas: Close narrow race in release
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
Matthew Wilcox authored and James Bottomley committed Oct 12, 2007
1 parent 1bd4057 commit c131993
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/qlogicfas.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit c131993

Please sign in to comment.