]> www.infradead.org Git - users/hch/dma-mapping.git/commitdiff
dma-debug: report -EEXIST errors in add_dma_entry dma-mapping-5.14
authorHamza Mahfooz <someguy@effective-light.com>
Tue, 18 May 2021 12:54:43 +0000 (08:54 -0400)
committerChristoph Hellwig <hch@lst.de>
Tue, 22 Jun 2021 06:15:47 +0000 (08:15 +0200)
Since, overlapping mappings are not supported by the DMA API we should
report an error if active_cacheline_insert returns -EEXIST.

Suggested-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Hamza Mahfooz <someguy@effective-light.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
kernel/dma/debug.c

index 14de1271463fd08db583c4eeb0512e32b4447798..dadae6255d0552643b54dc35b31339690cee770e 100644 (file)
@@ -566,11 +566,9 @@ static void add_dma_entry(struct dma_debug_entry *entry)
        if (rc == -ENOMEM) {
                pr_err("cacheline tracking ENOMEM, dma-debug disabled\n");
                global_disable = true;
+       } else if (rc == -EEXIST) {
+               pr_err("cacheline tracking EEXIST, overlapping mappings aren't supported\n");
        }
-
-       /* TODO: report -EEXIST errors here as overlapping mappings are
-        * not supported by the DMA API
-        */
 }
 
 static int dma_debug_create_entries(gfp_t gfp)