Patch "kasan: no need to unset panic_on_warn in end_report()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    kasan: no need to unset panic_on_warn in end_report()

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kasan-no-need-to-unset-panic_on_warn-in-end_report.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9d478734dc75f45636a9c454d6d75382b10439af
Author: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx>
Date:   Tue Jan 24 10:50:55 2023 -0800

    kasan: no need to unset panic_on_warn in end_report()
    
    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@xxxxxxxxxxx
    Signed-off-by: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx>
    Reviewed-by: Marco Elver <elver@xxxxxxxxxx>
    Cc: Andrey Ryabinin <ryabinin.a.a@xxxxxxxxx>
    Cc: Baoquan He <bhe@xxxxxxxxxx>
    Cc: Jonathan Corbet <corbet@xxxxxxx>
    Cc: Xuefeng Li <lixuefeng@xxxxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index 884a950c7026..bf17704b302f 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
@@ -117,16 +117,8 @@ static void end_report(unsigned long *flags, unsigned long addr)
 	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");
-	}
 	if (kasan_arg_fault == KASAN_ARG_FAULT_PANIC)
 		panic("kasan.fault=panic set ...\n");
 	kasan_enable_current();



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux