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)
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