aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sata_vsc.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-05-26 21:54:27 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-05-26 21:54:27 -0400
commitaa8f0dc6c3dbf1cf3ff58f3e945c981be134814d (patch)
tree3e343cd5493d442d1a26dc7a421422d84698831e /drivers/scsi/sata_vsc.c
parentbef9c558841604116704e10b3d9ff3dbf4939423 (diff)
libata: Fix use-after-iounmap
Jens Axboe pointed out that the iounmap() call in libata was occurring too early, and some drivers (ahci, probably others) were using ioremap'd memory after it had been unmapped. The patch should address that problem by way of improving the libata driver API: * move ->host_stop() call after all ->port_stop() calls have occurred. * create default helper function ata_host_stop(), and move iounmap() call there. * add ->host_stop_prewalk() hook, use it in sata_qstor.c (hi Mark). sata_qstor appears to require the host-stop-before-port-stop ordering that existed prior to applying the attached patch.
Diffstat (limited to 'drivers/scsi/sata_vsc.c')
-rw-r--r--drivers/scsi/sata_vsc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c
index 2c28f0ad73c2..f67c34330ae9 100644
--- a/drivers/scsi/sata_vsc.c
+++ b/drivers/scsi/sata_vsc.c
@@ -230,6 +230,7 @@ static struct ata_port_operations vsc_sata_ops = {
230 .scr_write = vsc_sata_scr_write, 230 .scr_write = vsc_sata_scr_write,
231 .port_start = ata_port_start, 231 .port_start = ata_port_start,
232 .port_stop = ata_port_stop, 232 .port_stop = ata_port_stop,
233 .host_stop = ata_host_stop,
233}; 234};
234 235
235static void __devinit vsc_sata_setup_port(struct ata_ioports *port, unsigned long base) 236static void __devinit vsc_sata_setup_port(struct ata_ioports *port, unsigned long base)