[PATCH 3.19.y-ckt 095/107] dma-debug: skip debug_dma_assert_idle() when disabled

Kamal Mostafa kamal at canonical.com
Wed Aug 5 21:49:27 UTC 2015


3.19.8-ckt5 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Haggai Eran <haggaie at mellanox.com>

commit c9d120b0b2b5069cb2ae62f8eac0cef31c8544be upstream.

If dma-debug is disabled due to a memory error, DMA unmaps do not affect
the dma_active_cacheline radix tree anymore, and debug_dma_assert_idle()
can print false warnings.

Disable debug_dma_assert_idle() when dma_debug_disabled() is true.

Signed-off-by: Haggai Eran <haggaie at mellanox.com>
Fixes: 0abdd7a81b7e ("dma-debug: introduce debug_dma_assert_idle()")
Cc: Dan Williams <dan.j.williams at intel.com>
Cc: Joerg Roedel <joro at 8bytes.org>
Cc: Vinod Koul <vinod.koul at intel.com>
Cc: Russell King <rmk+kernel at arm.linux.org.uk>
Cc: James Bottomley <JBottomley at Parallels.com>
Cc: Florian Fainelli <f.fainelli at gmail.com>
Cc: Sebastian Ott <sebott at linux.vnet.ibm.com>
Cc: Jiri Kosina <jkosina at suse.cz>
Cc: Horia Geanta <horia.geanta at freescale.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 lib/dma-debug.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 9722bd2..d75c2f4 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -574,6 +574,9 @@ void debug_dma_assert_idle(struct page *page)
 	unsigned long flags;
 	phys_addr_t cln;
 
+	if (dma_debug_disabled())
+		return;
+
 	if (!page)
 		return;
 
-- 
1.9.1





More information about the kernel-team mailing list