mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
UPSTREAM: kasan: move disable_trace_on_warning to start_report
Move the disable_trace_on_warning() call, which enables the
/proc/sys/kernel/traceoff_on_warning interface for KASAN bugs, to
start_report(), so that it functions for all types of KASAN reports.
Link: https://lkml.kernel.org/r/7c066c5de26234ad2cebdd931adfe437f8a95d58.1646237226.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Marco Elver <elver@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Bug: 254721825
(cherry picked from commit 0a6e8a07de)
Change-Id: Ic5cec0af91f5efe6d446daf861e6b8f75d39abdc
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
This commit is contained in:
committed by
Todd Kjos
parent
565c3801e5
commit
60746338ee
@@ -125,6 +125,8 @@ static DEFINE_SPINLOCK(report_lock);
|
||||
|
||||
static void start_report(unsigned long *flags, bool sync)
|
||||
{
|
||||
/* Respect the /proc/sys/kernel/traceoff_on_warning interface. */
|
||||
disable_trace_on_warning();
|
||||
/* Update status of the currently running KASAN test. */
|
||||
update_kunit_status(sync);
|
||||
/* Make sure we don't end up in loop. */
|
||||
@@ -408,7 +410,6 @@ static void __kasan_report(unsigned long addr, size_t size, bool is_write,
|
||||
void *untagged_addr;
|
||||
unsigned long flags;
|
||||
|
||||
disable_trace_on_warning();
|
||||
start_report(&flags, true);
|
||||
|
||||
tagged_addr = (void *)addr;
|
||||
|
||||
Reference in New Issue
Block a user