Commit 2b4bbc62 authored by Hamza Mahfooz's avatar Hamza Mahfooz Committed by Christoph Hellwig
Browse files

dma-debug: report -EEXIST errors in add_dma_entry



Since, overlapping mappings are not supported by the DMA API we should
report an error if active_cacheline_insert returns -EEXIST.

Suggested-by: default avatarDan Williams <dan.j.williams@intel.com>
Signed-off-by: default avatarHamza Mahfooz <someguy@effective-light.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent bab16223
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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)