Patch "printk: For @suppress_panic_printk check for other CPU in panic" has been added to the 6.6-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

    printk: For @suppress_panic_printk check for other CPU in panic

to the 6.6-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:
     printk-for-suppress_panic_printk-check-for-other-cpu.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 77db0ec8f78401bc45d6ee0cfa9b0e801185e2eb
Author: John Ogness <john.ogness@xxxxxxxxxxxxx>
Date:   Wed Feb 7 14:46:55 2024 +0106

    printk: For @suppress_panic_printk check for other CPU in panic
    
    [ Upstream commit 0ab7cdd00491b532591ef065be706301de7e448f ]
    
    Currently @suppress_panic_printk is checked along with
    non-matching @panic_cpu and current CPU. This works
    because @suppress_panic_printk is only set when
    panic_in_progress() is true.
    
    Rather than relying on the @suppress_panic_printk semantics,
    use the concise helper function other_cpu_in_progress(). The
    helper function exists to avoid open coding such tests.
    
    Signed-off-by: John Ogness <john.ogness@xxxxxxxxxxxxx>
    Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>
    Link: https://lore.kernel.org/r/20240207134103.1357162-7-john.ogness@xxxxxxxxxxxxx
    Signed-off-by: Petr Mladek <pmladek@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 35d32d66fb114..0fca282c0a254 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2309,8 +2309,7 @@ asmlinkage int vprintk_emit(int facility, int level,
 	if (unlikely(suppress_printk))
 		return 0;
 
-	if (unlikely(suppress_panic_printk) &&
-	    atomic_read(&panic_cpu) != raw_smp_processor_id())
+	if (unlikely(suppress_panic_printk) && other_cpu_in_panic())
 		return 0;
 
 	if (level == LOGLEVEL_SCHED) {




[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