Skip to content

Commit

Permalink
[SCSI] ips: 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 <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Matthew Wilcox authored and James Bottomley committed Oct 12, 2007
1 parent f01abb3 commit a50ee7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/ips.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,8 @@ ips_release(struct Scsi_Host *sh)

METHOD_TRACE("ips_release", 1);

scsi_remove_host(sh);

for (i = 0; i < IPS_MAX_ADAPTERS && ips_sh[i] != sh; i++) ;

if (i == IPS_MAX_ADAPTERS) {
Expand Down Expand Up @@ -707,7 +709,6 @@ ips_release(struct Scsi_Host *sh)
/* free IRQ */
free_irq(ha->irq, ha);

scsi_remove_host(sh);
scsi_host_put(sh);

ips_released_controllers++;
Expand Down

0 comments on commit a50ee7a

Please sign in to comment.