[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.11.1503161919270.1763@denkbrett>
Date: Mon, 16 Mar 2015 19:24:29 +0100 (CET)
From: Sebastian Ott <sebott@...ux.vnet.ibm.com>
To: linux-kernel@...r.kernel.org
cc: Andrew Morton <akpm@...ux-foundation.org>,
Florian Fainelli <f.fainelli@...il.com>,
Horia Geanta <horia.geanta@...escale.com>,
Jiri Kosina <jkosina@...e.cz>
Subject: [PATCH] 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@...ux.vnet.ibm.com>
---
lib/dma-debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -361,7 +361,7 @@ static struct dma_debug_entry *bucket_fi
unsigned int range = 0;
while (range <= max_range) {
- entry = __hash_bucket_find(*bucket, &index, containing_match);
+ entry = __hash_bucket_find(*bucket, ref, containing_match);
if (entry)
return entry;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists