Skip to content

Commit 4c113a5

Browse files
yghannambp3tk0v
authored andcommitted
x86/mce: Don't remove sysfs if thresholding sysfs init fails
Currently, the MCE subsystem sysfs interface will be removed if the thresholding sysfs interface fails to be created. A common failure is due to new MCA bank types that are not recognized and don't have a short name set. The MCA thresholding feature is optional and should not break the common MCE sysfs interface. Also, new MCA bank types are occasionally introduced, and updates will be needed to recognize them. But likewise, this should not break the common sysfs interface. Keep the MCE sysfs interface regardless of the status of the thresholding sysfs interface. Signed-off-by: Yazen Ghannam <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Reviewed-by: Qiuxu Zhuo <[email protected]> Reviewed-by: Tony Luck <[email protected]> Tested-by: Tony Luck <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/[email protected]
1 parent 86731a2 commit 4c113a5

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

arch/x86/kernel/cpu/mce/core.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2801,15 +2801,9 @@ static int mce_cpu_dead(unsigned int cpu)
28012801
static int mce_cpu_online(unsigned int cpu)
28022802
{
28032803
struct timer_list *t = this_cpu_ptr(&mce_timer);
2804-
int ret;
28052804

28062805
mce_device_create(cpu);
2807-
2808-
ret = mce_threshold_create_device(cpu);
2809-
if (ret) {
2810-
mce_device_remove(cpu);
2811-
return ret;
2812-
}
2806+
mce_threshold_create_device(cpu);
28132807
mce_reenable_cpu();
28142808
mce_start_timer(t);
28152809
return 0;

0 commit comments

Comments
 (0)