[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230124193004.206841-6-ebiggers@kernel.org>
Date: Tue, 24 Jan 2023 11:29:49 -0800
From: Eric Biggers <ebiggers@...nel.org>
To: stable@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Kees Cook <keescook@...omium.org>, SeongJae Park <sj@...nel.org>,
Seth Jenkins <sethjenkins@...gle.com>,
Jann Horn <jannh@...gle.com>,
"Eric W . Biederman" <ebiederm@...ssion.com>,
linux-hardening@...r.kernel.org, linux-kernel@...r.kernel.org,
Andrey Ryabinin <ryabinin.a.a@...il.com>,
Baoquan He <bhe@...hat.com>, Jonathan Corbet <corbet@....net>,
Xuefeng Li <lixuefeng@...ngson.cn>,
Tiezhu Yang <yangtiezhu@...ngson.cn>,
Marco Elver <elver@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: [PATCH 5.10 05/20] kasan: no need to unset panic_on_warn in end_report()
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
commit e7ce7500375a63348e1d3a703c8d5003cbe3fea6 upstream.
panic_on_warn is unset inside panic(), so no need to unset it before
calling panic() in end_report().
Link: https://lkml.kernel.org/r/1644324666-15947-6-git-send-email-yangtiezhu@loongson.cn
Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
Reviewed-by: Marco Elver <elver@...gle.com>
Cc: Andrey Ryabinin <ryabinin.a.a@...il.com>
Cc: Baoquan He <bhe@...hat.com>
Cc: Jonathan Corbet <corbet@....net>
Cc: Xuefeng Li <lixuefeng@...ngson.cn>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
Signed-off-by: Eric Biggers <ebiggers@...gle.com>
---
mm/kasan/report.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index 00a53f1355aec..91714acea0d61 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
@@ -95,16 +95,8 @@ static void end_report(unsigned long *flags)
pr_err("==================================================================\n");
add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
spin_unlock_irqrestore(&report_lock, *flags);
- if (panic_on_warn && !test_bit(KASAN_BIT_MULTI_SHOT, &kasan_flags)) {
- /*
- * This thread may hit another WARN() in the panic path.
- * Resetting this prevents additional WARN() from panicking the
- * system on this thread. Other threads are blocked by the
- * panic_mutex in panic().
- */
- panic_on_warn = 0;
+ if (panic_on_warn && !test_bit(KASAN_BIT_MULTI_SHOT, &kasan_flags))
panic("panic_on_warn set ...\n");
- }
kasan_enable_current();
}
--
2.39.1
Powered by blists - more mailing lists