diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2010-08-05 09:22:24 -0500 |
---|---|---|
committer | Jason Wessel <jason.wessel@windriver.com> | 2010-08-05 09:22:24 -0500 |
commit | eac790059b22883763759aeb468ff862bae4627e (patch) | |
tree | 912fbcca1887a75b47c19020fb4acc79fb6ce3f9 | |
parent | 9264b278be42c031dc76517a0d4bb154f5dcf470 (diff) | |
download | linux-3.10-eac790059b22883763759aeb468ff862bae4627e.tar.gz linux-3.10-eac790059b22883763759aeb468ff862bae4627e.tar.bz2 linux-3.10-eac790059b22883763759aeb468ff862bae4627e.zip |
mm,kdb,kgdb: Add a debug reference for the kdb kmap usage
The kdb kmap should never get used outside of the kernel debugger
exception context.
Signed-off-by: Jason Wessel<jason.wessel@windriver.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Ingo Molnar <mingo@elte.hu>
CC: linux-mm@kvack.org
-rw-r--r-- | mm/highmem.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/highmem.c b/mm/highmem.c index 66baa20f78f..7a0aa1be499 100644 --- a/mm/highmem.c +++ b/mm/highmem.c @@ -26,6 +26,7 @@ #include <linux/init.h> #include <linux/hash.h> #include <linux/highmem.h> +#include <linux/kgdb.h> #include <asm/tlbflush.h> /* @@ -470,6 +471,12 @@ void debug_kmap_atomic(enum km_type type) warn_count--; } } +#ifdef CONFIG_KGDB_KDB + if (unlikely(type == KM_KDB && atomic_read(&kgdb_active) == -1)) { + WARN_ON(1); + warn_count--; + } +#endif /* CONFIG_KGDB_KDB */ } #endif |