Skip to content

Commit

Permalink
[PATCH] x86-64: Fix kobject_init() WARN_ON on resume from disk
Browse files Browse the repository at this point in the history
Make mce_remove_device() clean up the kobject in per_cpu(device_mce, cpu)
after it has been unregistered.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Andi Kleen <ak@suse.de>
  • Loading branch information
Rafael J. Wysocki authored and Andi Kleen committed Dec 7, 2006
1 parent 026c66b commit d4c4571
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/x86_64/kernel/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit d4c4571

Please sign in to comment.