]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] aic7xxx/aic79xx: fix module removal path not to panic
authorJames Bottomley <James.Bottomley@steeleye.com>
Sun, 2 Oct 2005 20:22:35 +0000 (15:22 -0500)
committerJames Bottomley <jejb@mulgrave.(none)>
Sun, 2 Oct 2005 20:32:25 +0000 (15:32 -0500)
commit537c5256df172c11797b1755df31beec60df504b
tree5637b5d7d505869ee5aace5ad6ed33085fc78697
parentc525a81649c95d2c6bd119abd2503becfb639fba
[SCSI] aic7xxx/aic79xx: fix module removal path not to panic

In these drivers, scsi_remove_host() is called too late, at the point
it is called, the driver has already shut down too far to accept any
I/O that the shutdown might generate.  Any generated I/O actually
triggers a panic.

Fix this by calling scsi_remove_host() as early as possible and not
calling scsi_host_put() until just before we kfree the ahc_softc.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/aic7xxx/aic7770_osm.c
drivers/scsi/aic7xxx/aic79xx_osm.c
drivers/scsi/aic7xxx/aic79xx_osm_pci.c
drivers/scsi/aic7xxx/aic7xxx_osm.c
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c