[RHEL7,COMMIT] ms/kasan: support panic_on_warn

Submitted by Konstantin Khorenko on Oct. 30, 2017, 10:42 a.m.


Message ID 201710301042.v9UAgodc005421@finist_ce7.work
State New
Series "ms/kasan: support panic_on_warn"
Headers show

Commit Message

Konstantin Khorenko Oct. 30, 2017, 10:42 a.m.
The commit is pushed to "branch-rh7-3.10.0-693.1.1.vz7.37.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.1.1.vz7.37.19
commit 7398e66cc6da106564c8eca609e0818d4a2fccc5
Author: Dmitry Vyukov <dvyukov@google.com>
Date:   Mon Oct 30 13:42:50 2017 +0300

    ms/kasan: support panic_on_warn
    ms commit: 5c5c1f3 ("kasan: support panic_on_warn")
    If user sets panic_on_warn, he wants kernel to panic if there is
    anything barely wrong with the kernel.  KASAN-detected errors are
    definitely not less benign than an arbitrary kernel WARNING.
    Panic after KASAN errors if panic_on_warn is set.
    We use this for continuous fuzzing where we want kernel to stop and
    reboot on any error.
    Link: http://lkml.kernel.org/r/1476694764-31986-1-git-send-email-dvyukov@google.com
    Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
    Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
    Cc: Alexander Potapenko <glider@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Evgenii Shatokhin <eshatokhin@virtuozzo.com>
 mm/kasan/report.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index cbd7f6e..8070826 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
@@ -115,6 +115,8 @@  static void kasan_end_report(unsigned long *flags)
 	spin_unlock_irqrestore(&report_lock, *flags);
+	if (panic_on_warn)
+		panic("panic_on_warn set ...\n");