]> git.karo-electronics.de Git - karo-tx-linux.git/commit
lib/dma-debug: fix bucket_find_contain()
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Tue, 7 Apr 2015 23:45:02 +0000 (09:45 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Apr 2015 23:45:02 +0000 (09:45 +1000)
commit9aeaca302d101f582f75c61f641b7241351826c6
treefaf4516f554e389e5a6058ed6598f5e20bfa33b9
parenta0ac064084bd40f8f6b0fc04112e3fd9bed6a14d
lib/dma-debug: fix bucket_find_contain()

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: Sebastian 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: Andrew Morton <akpm@linux-foundation.org>
lib/dma-debug.c