summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYazen Ghannam <yazen.ghannam@amd.com>2023-03-01 22:14:20 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-22 13:31:36 +0100
commit09d3a46c8c0287232877386dd04bd78981b1a0c6 (patch)
treea807b8bf7cd5853f4159a767574e0c2282cb52a4
parent8575c98224b20542d3eec7883d4e1b8fe43f3035 (diff)
downloadlinux-09d3a46c8c0287232877386dd04bd78981b1a0c6.tar.gz
linux-09d3a46c8c0287232877386dd04bd78981b1a0c6.tar.bz2
linux-09d3a46c8c0287232877386dd04bd78981b1a0c6.zip
x86/mce: Make sure logged MCEs are processed after sysfs update
commit 4783b9cb374af02d49740e00e2da19fd4ed6dec4 upstream. A recent change introduced a flag to queue up errors found during boot-time polling. These errors will be processed during late init once the MCE subsystem is fully set up. A number of sysfs updates call mce_restart() which goes through a subset of the CPU init flow. This includes polling MCA banks and logging any errors found. Since the same function is used as boot-time polling, errors will be queued. However, the system is now past late init, so the errors will remain queued until another error is found and the workqueue is triggered. Call mce_schedule_work() at the end of mce_restart() so that queued errors are processed. Fixes: 3bff147b187d ("x86/mce: Defer processing of early errors") Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tony Luck <tony.luck@intel.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230301221420.2203184-1-yazen.ghannam@amd.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/x86/kernel/cpu/mce/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index 5ee82fd386dd..a0727723676b 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -2302,6 +2302,7 @@ static void mce_restart(void)
{
mce_timer_delete_all();
on_each_cpu(mce_cpu_restart, NULL, 1);
+ mce_schedule_work();
}
/* Toggle features for corrected errors */