summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2007-08-15 20:56:57 +0200
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 20:51:22 +0200
commit1bd405734651c9ebd1c872a452614f9fe381c673 (patch)
tree5f5e4a34ce580859f6de0adc15612f77123be6bc /drivers
parent[SCSI] ncr53c8xx: Call scsi_host_put in release (diff)
downloadlinux-1bd405734651c9ebd1c872a452614f9fe381c673.tar.xz
linux-1bd405734651c9ebd1c872a452614f9fe381c673.zip
[SCSI] aha152x: 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')
-rw-r--r--drivers/scsi/aha152x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c
index d30a30786dda..f08e71e0205a 100644
--- a/drivers/scsi/aha152x.c
+++ b/drivers/scsi/aha152x.c
@@ -907,9 +907,10 @@ out_host_put:
void aha152x_release(struct Scsi_Host *shpnt)
{
- if(!shpnt)
+ if (!shpnt)
return;
+ scsi_remove_host(shpnt);
if (shpnt->irq)
free_irq(shpnt->irq, shpnt);
@@ -923,7 +924,6 @@ void aha152x_release(struct Scsi_Host *shpnt)
pnp_device_detach(HOSTDATA(shpnt)->pnpdev);
#endif
- scsi_remove_host(shpnt);
list_del(&HOSTDATA(shpnt)->host_list);
scsi_host_put(shpnt);
}