mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Don't let ata_completed() dereference a null request->dma pointer to
print dma status after a media error.
This commit is contained in:
parent
7dd492e17c
commit
475a75abe5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=185357
@ -357,7 +357,7 @@ ata_completed(void *context, int dummy)
|
||||
"\6MEDIA_CHANGED\5NID_NOT_FOUND"
|
||||
"\4MEDIA_CHANGE_REQEST"
|
||||
"\3ABORTED\2NO_MEDIA\1ILLEGAL_LENGTH");
|
||||
if ((request->flags & ATA_R_DMA) &&
|
||||
if ((request->flags & ATA_R_DMA) && request->dma &&
|
||||
(request->dma->status & ATA_BMSTAT_ERROR))
|
||||
printf(" dma=0x%02x", request->dma->status);
|
||||
if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL)))
|
||||
|
Loading…
Reference in New Issue
Block a user