⬢ DragonFlyBSD Kernel Audit
DF-4809 / fix.diff
← back to finding ↓ download raw
--- sys/dev/disk/nata/chipsets/ata-ahci.c
+++ sys/dev/disk/nata/chipsets/ata-ahci.c
@@ -461,6 +461,10 @@ ata_ahci_reset(device_t dev)
 	return;
     }
 
+    /* DMA workspace allocation failed during channel attach -- nothing to do */
+    if (ch->dma == NULL || ch->dma->work_bus == 0)
+	return;
+
     /* setup work areas */
     work = ch->dma->work_bus + ATA_AHCI_CL_OFFSET;
     ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_CLB + offset, work & 0xffffffff);