From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753690AbbFDOPF (ORCPT ); Thu, 4 Jun 2015 10:15:05 -0400 Received: from terminus.zytor.com ([198.137.202.10]:47080 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752709AbbFDOPC (ORCPT ); Thu, 4 Jun 2015 10:15:02 -0400 Date: Thu, 4 Jun 2015 07:14:31 -0700 From: tip-bot for Alexander Shishkin Message-ID: Cc: peterz@infradead.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, tglx@linutronix.de, alexander.shishkin@linux.intel.com, tvrtko.ursulin@linux.intel.com, imre.deak@intel.com, akpm@linux-foundation.org, mingo@kernel.org, hpa@zytor.com Reply-To: alexander.shishkin@linux.intel.com, tvrtko.ursulin@linux.intel.com, imre.deak@intel.com, akpm@linux-foundation.org, mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, peterz@infradead.org, torvalds@linux-foundation.org, tglx@linutronix.de To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf/x86/intel/pt: Fix a refactoring bug Git-Commit-ID: b44a2b53becf2485f484bd6bb6c1d963ebc339f8 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: b44a2b53becf2485f484bd6bb6c1d963ebc339f8 Gitweb: http://git.kernel.org/tip/b44a2b53becf2485f484bd6bb6c1d963ebc339f8 Author: Alexander Shishkin AuthorDate: Thu, 4 Jun 2015 16:31:47 +0300 Committer: Ingo Molnar CommitDate: Thu, 4 Jun 2015 16:07:51 +0200 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 Reported-by: Imre Deak Signed-off-by: Alexander Shishkin Cc: Cc: Andrew Morton Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar --- arch/x86/kernel/cpu/perf_event_intel_pt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/perf_event_intel_pt.c b/arch/x86/kernel/cpu/perf_event_intel_pt.c index 5b804f9..123ff1b 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_pt.c +++ b/arch/x86/kernel/cpu/perf_event_intel_pt.c @@ -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;