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 <m...@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); } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"