mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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
This commit is contained in:
parent
9264b278be
commit
eac790059b
@ -26,6 +26,7 @@
|
|||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/hash.h>
|
#include <linux/hash.h>
|
||||||
#include <linux/highmem.h>
|
#include <linux/highmem.h>
|
||||||
|
#include <linux/kgdb.h>
|
||||||
#include <asm/tlbflush.h>
|
#include <asm/tlbflush.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -470,6 +471,12 @@ void debug_kmap_atomic(enum km_type type)
|
|||||||
warn_count--;
|
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
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user