Patch "APEI: GHES: Have GHES honor the panic= setting" has been added to the 6.13-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

    APEI: GHES: Have GHES honor the panic= setting

to the 6.13-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:
     apei-ghes-have-ghes-honor-the-panic-setting.patch
and it can be found in the queue-6.13 subdirectory.

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



commit cf64c2ef7d06be41322fbbf3fccff644ffc65241
Author: Borislav Petkov <bp@xxxxxxxxx>
Date:   Mon Jan 13 13:52:24 2025 +0100

    APEI: GHES: Have GHES honor the panic= setting
    
    [ Upstream commit 5c0e00a391dd0099fe95991bb2f962848d851916 ]
    
    The GHES driver overrides the panic= setting by force-rebooting the
    system after a fatal hw error has been reported. The intent being that
    such an error would be reported earlier.
    
    However, this is not optimal when a hard-to-debug issue requires long
    time to reproduce and when that happens, the box will get rebooted after
    30 seconds and thus destroy the whole hw context of when the error
    happened.
    
    So rip out the default GHES panic timeout and honor the global one.
    
    In the panic disabled (panic=0) case, the error will still be logged to
    dmesg for later inspection and if panic after a hw error is really
    required, then that can be controlled the usual way - use panic= on the
    cmdline or set it in the kernel .config's CONFIG_PANIC_TIMEOUT.
    
    Reported-by: Feng Tang <feng.tang@xxxxxxxxxxxxxxxxx>
    Signed-off-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>
    Reviewed-by: Feng Tang <feng.tang@xxxxxxxxxxxxxxxxx>
    Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx>
    Link: https://patch.msgid.link/20250113125224.GFZ4UMiNtWIJvgpveU@fat_crate.local
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 07789f0b59bcd..b727724946556 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -173,8 +173,6 @@ static struct gen_pool *ghes_estatus_pool;
 static struct ghes_estatus_cache __rcu *ghes_estatus_caches[GHES_ESTATUS_CACHES_SIZE];
 static atomic_t ghes_estatus_cache_alloced;
 
-static int ghes_panic_timeout __read_mostly = 30;
-
 static void __iomem *ghes_map(u64 pfn, enum fixed_addresses fixmap_idx)
 {
 	phys_addr_t paddr;
@@ -983,14 +981,16 @@ static void __ghes_panic(struct ghes *ghes,
 			 struct acpi_hest_generic_status *estatus,
 			 u64 buf_paddr, enum fixed_addresses fixmap_idx)
 {
+	const char *msg = GHES_PFX "Fatal hardware error";
+
 	__ghes_print_estatus(KERN_EMERG, ghes->generic, estatus);
 
 	ghes_clear_estatus(ghes, estatus, buf_paddr, fixmap_idx);
 
-	/* reboot to log the error! */
 	if (!panic_timeout)
-		panic_timeout = ghes_panic_timeout;
-	panic("Fatal hardware error!");
+		pr_emerg("%s but panic disabled\n", msg);
+
+	panic(msg);
 }
 
 static int ghes_proc(struct ghes *ghes)




[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