perf/x86/intel/pt: Fix a refactoring bug
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.
Reported-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reported-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Родитель
68ab747604
Коммит
b44a2b53be
|
@ -151,7 +151,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;
|
||||
de_attr->attr.show = pt_cap_show;
|
||||
|
|
Загрузка…
Ссылка в новой задаче