diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-05-27 03:54:27 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-05-27 03:54:27 +0200 |
commit | aa8f0dc6c3dbf1cf3ff58f3e945c981be134814d (patch) | |
tree | 3e343cd5493d442d1a26dc7a421422d84698831e /drivers/scsi/sata_sis.c | |
parent | Merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 (diff) | |
download | linux-aa8f0dc6c3dbf1cf3ff58f3e945c981be134814d.tar.xz linux-aa8f0dc6c3dbf1cf3ff58f3e945c981be134814d.zip |
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_sis.c')
-rw-r--r-- | drivers/scsi/sata_sis.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/sata_sis.c b/drivers/scsi/sata_sis.c index 5105ddd08447..e418b89c6b9d 100644 --- a/drivers/scsi/sata_sis.c +++ b/drivers/scsi/sata_sis.c @@ -114,6 +114,7 @@ static struct ata_port_operations sis_ops = { .scr_write = sis_scr_write, .port_start = ata_port_start, .port_stop = ata_port_stop, + .host_stop = ata_host_stop, }; static struct ata_port_info sis_port_info = { |