]> Git Repo - linux.git/commit
kernel debug: support resetting WARN*_ONCE
authorAndi Kleen <[email protected]>
Fri, 17 Nov 2017 23:27:03 +0000 (15:27 -0800)
committerLinus Torvalds <[email protected]>
Sat, 18 Nov 2017 00:10:00 +0000 (16:10 -0800)
commitb1fca27d384e8418aac84b39f6f5179aecc1b64f
treee08be97de59a1cbb16df46273aadef161358b8ba
parentfb6cc4ac15c354fa1eb449f50a0dfe5f4bf0d42a
kernel debug: support resetting WARN*_ONCE

I like _ONCE warnings because it's guaranteed that they don't flood the
log.

During testing I find it useful to reset the state of the once warnings,
so that I can rerun tests and see if they trigger again, or can
guarantee that a test run always hits the same warnings.

This patch adds a debugfs interface to reset all the _ONCE warnings so
that they appear again:

  echo 1 > /sys/kernel/debug/clear_warn_once

This is implemented by putting all the warning booleans into a special
section, and clearing it.

[[email protected]: coding-style fixes]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Andi Kleen <[email protected]>
Tested-by: Michael Ellerman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Documentation/clearing-warn-once.txt [new file with mode: 0644]
include/asm-generic/bug.h
include/asm-generic/sections.h
include/asm-generic/vmlinux.lds.h
kernel/panic.c
This page took 0.057256 seconds and 4 git commands to generate.