Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4c45718 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Andi Kleen
Browse files

[PATCH] x86-64: Fix kobject_init() WARN_ON on resume from disk



Make mce_remove_device() clean up the kobject in per_cpu(device_mce, cpu)
after it has been unregistered.

Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent 026c66bd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -652,6 +652,7 @@ static void mce_remove_device(unsigned int cpu)
	sysdev_remove_file(&per_cpu(device_mce,cpu), &attr_tolerant);
	sysdev_remove_file(&per_cpu(device_mce,cpu), &attr_check_interval);
	sysdev_unregister(&per_cpu(device_mce,cpu));
	memset(&per_cpu(device_mce, cpu).kobj, 0, sizeof(struct kobject));
}

/* Get notified when a cpu comes on/off. Be hotplug friendly. */