projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f19828
)
lkdtm: add "WARNING" trigger
author
Kees Cook
<keescook@chromium.org>
Mon, 8 Jul 2013 17:01:31 +0000
(10:01 -0700)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 25 Jul 2013 05:47:19 +0000
(22:47 -0700)
For additional testing, add "WARNING" as a trigger that calls WARN_ON(1).
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/lkdtm.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/misc/lkdtm.c
b/drivers/misc/lkdtm.c
index adb6bde2ecc21793803e82c9bed85be094f85101..b1323fc881b1baa7c5bfd29979079b2b714c9ffb 100644
(file)
--- a/
drivers/misc/lkdtm.c
+++ b/
drivers/misc/lkdtm.c
@@
-68,6
+68,7
@@
enum ctype {
CT_NONE,
CT_PANIC,
CT_BUG,
+ CT_WARNING,
CT_EXCEPTION,
CT_LOOP,
CT_OVERFLOW,
@@
-95,6
+96,7
@@
static char* cp_name[] = {
static char* cp_type[] = {
"PANIC",
"BUG",
+ "WARNING",
"EXCEPTION",
"LOOP",
"OVERFLOW",
@@
-284,6
+286,9
@@
static void lkdtm_do_action(enum ctype which)
case CT_BUG:
BUG();
break;
+ case CT_WARNING:
+ WARN_ON(1);
+ break;
case CT_EXCEPTION:
*((int *) 0) = 0;
break;