diff options
author | 2017-11-17 15:27:17 -0800 | |
---|---|---|
committer | 2017-11-17 16:10:01 -0800 | |
commit | d32f11ba281b7e203932c0a65ec1fb302493cbbe (patch) | |
tree | 9771f522d9a45534d6ac0bfc9b64512df97f7fff /drivers/misc | |
parent | iopoll: avoid -Wint-in-bool-context warning (diff) | |
download | linux-d32f11ba281b7e203932c0a65ec1fb302493cbbe.tar.gz linux-d32f11ba281b7e203932c0a65ec1fb302493cbbe.tar.bz2 linux-d32f11ba281b7e203932c0a65ec1fb302493cbbe.zip |
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/1510100869-73751-2-git-send-email-keescook@chromium.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc')
-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) |