diff options
author | Kees Cook <[email protected]> | 2017-11-17 15:27:17 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2017-11-17 16:10:01 -0800 |
commit | d32f11ba281b7e203932c0a65ec1fb302493cbbe (patch) | |
tree | 9771f522d9a45534d6ac0bfc9b64512df97f7fff | |
parent | d15809f3649e2ee04713a9dba9aa7bd2c208ad82 (diff) |
lkdtm: include WARN format string
In order to test the ordering of WARN format strings, actually include
one in LKDTM.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Kees Cook <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Fengguang Wu <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | drivers/misc/lkdtm_bugs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/misc/lkdtm_bugs.c b/drivers/misc/lkdtm_bugs.c index b0f7af872bb5..7eebbdfbcacd 100644 --- a/drivers/misc/lkdtm_bugs.c +++ b/drivers/misc/lkdtm_bugs.c @@ -63,9 +63,11 @@ void lkdtm_BUG(void) BUG(); } +static int warn_counter; + void lkdtm_WARNING(void) { - WARN_ON(1); + WARN(1, "Warning message trigger count: %d\n", warn_counter++); } void lkdtm_EXCEPTION(void) |