git: kernel - Fix busdma allocation bug

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Jan 15 16:43:53 PST 2018


commit 3124cc72c2e91c6faba65eee98ae1f37165654e0
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon Jan 15 16:42:00 2018 -0800

    kernel - Fix busdma allocation bug
    
    * Fix a bug where kmalloc() could be used to allocate DMA memory
      that the caller intends to be non-cacheable.
    
      If a non-cacheable tag is specified, bus_dma now uses contigmalloc.
    
    * Use the bus_dmamap_t pointer to differentiate between kmalloc
      and contigmalloc allocated memory, instead of running tag tests.
    
      This is a bit of a hack, but its the easiest solution.

Summary of changes:
 sys/platform/pc64/x86_64/busdma_machdep.c | 36 +++++++++++++++----------------
 sys/sys/bus_dma.h                         |  4 ++--
 2 files changed, 20 insertions(+), 20 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3124cc72c2e91c6faba65eee98ae1f37165654e0


-- 
DragonFly BSD source repository



More information about the Commits mailing list