aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2007-08-15 14:57:00 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:51:40 -0400
commita50ee7a72888d072512e4434c44959743bfb1570 (patch)
treec33bc6ea2aadf3ad86cd2c1191ee64087a12aa25 /drivers/scsi
parentf01abb362f878b8e2de69c03662d8e7f3ae1d6f8 (diff)
[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: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ips.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index b17771b1c605..36b676594336 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -656,6 +656,8 @@ ips_release(struct Scsi_Host *sh)
656 656
657 METHOD_TRACE("ips_release", 1); 657 METHOD_TRACE("ips_release", 1);
658 658
659 scsi_remove_host(sh);
660
659 for (i = 0; i < IPS_MAX_ADAPTERS && ips_sh[i] != sh; i++) ; 661 for (i = 0; i < IPS_MAX_ADAPTERS && ips_sh[i] != sh; i++) ;
660 662
661 if (i == IPS_MAX_ADAPTERS) { 663 if (i == IPS_MAX_ADAPTERS) {
@@ -707,7 +709,6 @@ ips_release(struct Scsi_Host *sh)
707 /* free IRQ */ 709 /* free IRQ */
708 free_irq(ha->irq, ha); 710 free_irq(ha->irq, ha);
709 711
710 scsi_remove_host(sh);
711 scsi_host_put(sh); 712 scsi_host_put(sh);
712 713
713 ips_released_controllers++; 714 ips_released_controllers++;