Date: Thu, 30 May 2019 13:19:32 +0000 (UTC) From: Marcin Wojtas <mw@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348395 - head/sys/dev/ena Message-ID: <201905301319.x4UDJWwM061332@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905301319.x4UDJWwM061332>