aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
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 /include/linux
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 'include/linux')
-rw-r--r--include/linux/libata.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 1f7e2039a04e..e74f301e9bae 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -410,6 +410,7 @@ extern u8 ata_chk_err(struct ata_port *ap);
410extern void ata_exec_command(struct ata_port *ap, struct ata_taskfile *tf); 410extern void ata_exec_command(struct ata_port *ap, struct ata_taskfile *tf);
411extern int ata_port_start (struct ata_port *ap); 411extern int ata_port_start (struct ata_port *ap);
412extern void ata_port_stop (struct ata_port *ap); 412extern void ata_port_stop (struct ata_port *ap);
413extern void ata_host_stop (struct ata_host_set *host_set);
413extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); 414extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs);
414extern void ata_qc_prep(struct ata_queued_cmd *qc); 415extern void ata_qc_prep(struct ata_queued_cmd *qc);
415extern int ata_qc_issue_prot(struct ata_queued_cmd *qc); 416extern int ata_qc_issue_prot(struct ata_queued_cmd *qc);