The patch titled Subject: lib/dma-debug.c: fix __hash_bucket_find() has been added to the -mm tree. Its filename is lib-dma-debugc-fix-__hash_bucket_find.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Ming Lei <ming.lei@xxxxxxxxxxxxx> Subject: lib/dma-debug.c: fix __hash_bucket_find() If there is only one match, the unique matched entry should be returned. Without the fix, the f62566214fe ("dma-debug: new interfaces to debug dma mapping errors") can't work reliably because only device and dma_addr are passed to dma_mapping_error(). Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxxxxx> Reported-by: Wu Fengguang <fengguang.wu@xxxxxxxxx> Cc: Joerg Roedel <joerg.roedel@xxxxxxx> Tested-by: Shuah Khan <shuah.khan@xxxxxx> Cc: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx> Cc: Jakub Kicinski <kubakici@xxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/dma-debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN lib/dma-debug.c~lib-dma-debugc-fix-__hash_bucket_find lib/dma-debug.c --- a/lib/dma-debug.c~lib-dma-debugc-fix-__hash_bucket_find +++ a/lib/dma-debug.c @@ -264,7 +264,7 @@ static struct dma_debug_entry *__hash_bu match_fn match) { struct dma_debug_entry *entry, *ret = NULL; - int matches = 0, match_lvl, last_lvl = 0; + int matches = 0, match_lvl, last_lvl = -1; list_for_each_entry(entry, &bucket->list, list) { if (!match(ref, entry)) @@ -293,7 +293,7 @@ static struct dma_debug_entry *__hash_bu } else if (match_lvl > last_lvl) { /* * We found an entry that fits better then the - * previous one + * previous one or it is the 1st match. */ last_lvl = match_lvl; ret = entry; _ Patches currently in -mm which might be from ming.lei@xxxxxxxxxxxxx are lib-dma-debugc-fix-__hash_bucket_find.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html