]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc64: release thirds level cache reference for cpu hotplug feature
authorAllen Pais <allen.pais@oracle.com>
Fri, 18 Nov 2016 07:34:57 +0000 (13:04 +0530)
committerAllen Pais <allen.pais@oracle.com>
Sun, 22 Jan 2017 15:37:19 +0000 (21:07 +0530)
 This crash as see on T7-4 which was related to the introduction of
3rd level caching patch.

issue: sysfs: cannot create duplicate filename '/devices/system/cpu/cpu0/cache'

Orabug: 24841354

Reviewed-by: Chris Hyser <chris.hyser@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
(cherry picked from commit c33aebff52457ee7d0bacc922dc23b07cee4139a)

arch/sparc/kernel/sysfs.c

index 3708a783d36998cfe67c55036ae7bbdcaaf1a04e..f5043d3b046865e5bc136f6e02b7a9ba657941af 100644 (file)
@@ -480,6 +480,10 @@ static void unregister_cpu_online(unsigned int cpu)
        unregister_mmu_stats(s);
        for (i = 0; i < ARRAY_SIZE(cpu_core_attrs); i++)
                device_remove_file(s, &cpu_core_attrs[i]);
+
+       for (i = 0; i < MAX_CACHE_LEVEL; i++)
+               kobject_put(&(INDEX_KOBJECT_PTR(cpu, i)->kobj));
+       kobject_put(cache_kobjs[cpu]);
 }
 #endif