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

[SCSI] ips: 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 f01abb36
...@@ -656,6 +656,8 @@ ips_release(struct Scsi_Host *sh) ...@@ -656,6 +656,8 @@ ips_release(struct Scsi_Host *sh)
METHOD_TRACE("ips_release", 1); METHOD_TRACE("ips_release", 1);
scsi_remove_host(sh);
for (i = 0; i < IPS_MAX_ADAPTERS && ips_sh[i] != sh; i++) ; for (i = 0; i < IPS_MAX_ADAPTERS && ips_sh[i] != sh; i++) ;
if (i == IPS_MAX_ADAPTERS) { if (i == IPS_MAX_ADAPTERS) {
...@@ -707,7 +709,6 @@ ips_release(struct Scsi_Host *sh) ...@@ -707,7 +709,6 @@ ips_release(struct Scsi_Host *sh)
/* free IRQ */ /* free IRQ */
free_irq(ha->irq, ha); free_irq(ha->irq, ha);
scsi_remove_host(sh);
scsi_host_put(sh); scsi_host_put(sh);
ips_released_controllers++; ips_released_controllers++;
......
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