]> git.baikalelectronics.ru Git - kernel.git/commit
x86/mce: Make sure logged MCEs are processed after sysfs update
authorYazen Ghannam <yazen.ghannam@amd.com>
Wed, 1 Mar 2023 22:14:20 +0000 (22:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:34:05 +0000 (13:34 +0100)
commite56a6fdffcb7cee8cdba3e23183038efa6dfa55b
tree34b09b4a578c5bb7c5d6d4b98fce77fedf0a508d
parent7ac38b9b38bdd5aeb13f2540043c46b53d41f7a8
x86/mce: Make sure logged MCEs are processed after sysfs update

commit 1fcbb7c9ce249a322ee032ae50421c02940bc05b 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: 1c8d2f770b32 ("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>
arch/x86/kernel/cpu/mce/core.c