Dan Williams 59f2e7df57 dma-debug: fix overlap detection
Commit 0abdd7a81b7e ("dma-debug: introduce debug_dma_assert_idle()") was
reworked to expand the overlap counter to the full range expressable by
3 tag bits, but it has a thinko in treating the overlap counter as a
pure reference count for the entry.

Instead of deleting when the reference-count drops to zero, we need to
delete when the overlap-count drops below zero.  Also, when detecting
overflow we can just test the overlap-count > MAX rather than applying
special meaning to 0.

Regression report available here:
http://marc.info/?l=linux-netdev&m=139073373932386&w=2

This patch, now tested on the original net_dma case, sees the expected
handful of reports before the eventual data corruption occurs.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-01-29 16:22:40 -08:00
..
2013-09-10 13:03:41 -07:00
2013-03-13 15:21:48 -07:00
2011-03-11 14:25:50 +00:00
2008-06-06 11:29:10 -07:00
2013-07-09 10:33:30 -07:00
2011-10-29 21:20:22 +02:00
2011-03-31 11:26:23 -03:00
2013-02-27 19:10:09 -08:00
2014-01-29 16:22:40 -08:00
2012-10-06 03:04:57 +09:00
2012-10-09 16:22:40 +09:00
2013-06-18 13:48:45 +02:00
2012-07-30 17:25:16 -07:00
2012-01-31 23:19:47 +02:00
2013-04-29 18:28:42 -07:00