• Sebastian Ott's avatar
    lib/dma-debug: fix bucket_find_contain() · a7a2c02a
    Sebastian Ott authored
    bucket_find_contain() will search the bucket list for a dma_debug_entry.
    When the entry isn't found it needs to search other buckets too, since
    only the start address of a dma range is hashed (which might be in a
    different bucket).
    
    A copy of the dma_debug_entry is used to get the previous hash bucket
    but when its list is searched the original dma_debug_entry is to be used
    not its modified copy.
    
    This fixes false "device driver tries to sync DMA memory it has not allocated"
    warnings.
    Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
    Cc: Florian Fainelli <f.fainelli@gmail.com>
    Cc: Horia Geanta <horia.geanta@freescale.com>
    Cc: Jiri Kosina <jkosina@suse.cz>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    a7a2c02a
dma-debug.c 41.9 KB