]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] x86-64: Fix kobject_init() WARN_ON on resume from disk
authorRafael J. Wysocki <rjw@sisk.pl>
Thu, 7 Dec 2006 01:14:12 +0000 (02:14 +0100)
committerAndi Kleen <andi@basil.nowhere.org>
Thu, 7 Dec 2006 01:14:12 +0000 (02:14 +0100)
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>
arch/x86_64/kernel/mce.c

index bbea88801d883cc8928c6a9c91fe5bf5efbf4c9f..a7440cb9c14fe20d9aa7c329cdd6d0c6801f1689 100644 (file)
@@ -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. */