svn commit: r348395 - head/sys/dev/ena
Marcin Wojtas
mw at FreeBSD.org
Thu May 30 13:19:33 UTC 2019
Author: mw
Date: Thu May 30 13:19:32 2019
New Revision: 348395
URL: https://svnweb.freebsd.org/changeset/base/348395
Log:
Set vaddr and paddr as NULL when DMA alloc fails in ENA
To prevent errors from assigning values from the DMA structure in case
of an error, zero the vaddr and paddr values upon failure.
Submitted by: Michal Krawczyk <mk at semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon, Inc.
Modified:
head/sys/dev/ena/ena.c
Modified: head/sys/dev/ena/ena.c
==============================================================================
--- head/sys/dev/ena/ena.c Thu May 30 13:18:23 2019 (r348394)
+++ head/sys/dev/ena/ena.c Thu May 30 13:19:32 2019 (r348395)
@@ -279,6 +279,8 @@ fail_map_create:
bus_dma_tag_destroy(dma->tag);
fail_tag:
dma->tag = NULL;
+ dma->vaddr = NULL;
+ dma->paddr = 0;
return (error);
}
More information about the svn-src-all
mailing list