diff options
author | njl <njl@FreeBSD.org> | 2004-08-06 22:23:53 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2004-08-06 22:23:53 +0000 |
commit | d9ff05bfb194a706d6f01bdcb506b0d92de0a773 (patch) | |
tree | bdc33355f0797767465054c8013a200106662d52 /sys | |
parent | ee17f9503f9f951550c3d9c416538292ae1655fa (diff) | |
download | FreeBSD-src-d9ff05bfb194a706d6f01bdcb506b0d92de0a773.zip FreeBSD-src-d9ff05bfb194a706d6f01bdcb506b0d92de0a773.tar.gz |
Fix a panic in ata_generic_transaction(). The DMA pointer of the channel
was being unconditionally dereferenced but was NULL for PIO requests.
Check the request flags for a DMA transaction before dereferencing.
Reported by: ceri
Tested by: Radek Kozlowski <radek -at- raadradd.com>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ata/ata-lowlevel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-lowlevel.c b/sys/dev/ata/ata-lowlevel.c index e305085..e5589e4 100644 --- a/sys/dev/ata/ata-lowlevel.c +++ b/sys/dev/ata/ata-lowlevel.c @@ -295,7 +295,7 @@ ata_generic_transaction(struct ata_request *request) } /* request finish here */ - if (ch->dma->flags & ATA_DMA_LOADED) + if (request->flags & ATA_R_DMA && ch->dma->flags & ATA_DMA_LOADED) ch->dma->unload(ch); return ATA_OP_FINISHED; } |