From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753925AbcBXTWh (ORCPT ); Wed, 24 Feb 2016 14:22:37 -0500 Received: from www.linutronix.de ([62.245.132.108]:49694 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752316AbcBXTWg (ORCPT ); Wed, 24 Feb 2016 14:22:36 -0500 Date: Wed, 24 Feb 2016 20:21:12 +0100 (CET) From: Thomas Gleixner To: Vikas Shivappa cc: Vikas Shivappa , x86@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, peterz@infradead.org, ravi.v.shankar@intel.com, tony.luck@intel.com, fenghua.yu@intel.com, kanaka.d.juvva@intel.com, h.peter.anvin@intel.com Subject: Re: [PATCH 2/5] x86/mbm: Intel Memory B/W Monitoring enumeration and init In-Reply-To: Message-ID: References: <1455152873-30467-1-git-send-email-vikas.shivappa@linux.intel.com> <1455152873-30467-3-git-send-email-vikas.shivappa@linux.intel.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 24 Feb 2016, Vikas Shivappa wrote: > On Wed, 24 Feb 2016, Thomas Gleixner wrote: > > You really should register the notifier _AFTER_ registering the pmu. That > > needs to be fixed anyway, because the existing code leaks the notifier AND > > memory in case perf_pmu_register fails. > > Correct, Will fix the notifier leak It's not only a notifier leak. The existing code also leaks memory. Please fix that before adding the new stuff in a seperate patch. Thanks, tglx