mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-23 00:33:21 +00:00
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>
This commit is contained in:
parent
cc701b73b8
commit
c68afc9d21
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=133235
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue