Skip to contentSkip to conversation

perf/x86/intel/pt: Fix a refactoring glitch

PATCH New Alexander Shishkin 1 participant 1 message Jun 4, 2015

Subsystems (2)
lore
Share & tools
lore

Alexander Shishkin

author reviewer
#0 lore raw

PATCH 1/1 perf/x86/intel/pt: Fix a refactoring glitch

Commit 066450be41 ("perf/x86/intel/pt: Clean up the control flow in pt_pmu_hw_init()") changed attribute initialization so that only the first attribute gets initialized using sysfs_attr_init(), which upsets lockdep.

This patch fixes the glitch so that all allocated attributes are properly initialized thus fixing the lockdep warning reported by Tvrtko and Imre.

---
 arch/x86/kernel/cpu/perf_event_intel_pt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/perf_event_intel_pt.c +1 -1
index ccdda1311e..7ef69b2c46 100644
@@ -197,7 +197,7 @@ static int __init pt_pmu_hw_init(void)
 
 		de_attr->attr.attr.name = pt_caps[i].name;
 
-		sysfs_attr_init(&de_attrs->attr.attr);
+		sysfs_attr_init(&de_attr->attr.attr);
 
 		de_attr->attr.attr.mode		= S_IRUGO | S_IWUSR;
 		de_attr->attr.store		= pt_cap_store;
Signature · 1 line
2.1.4