Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932200AbcCBR7P (ORCPT ); Wed, 2 Mar 2016 12:59:15 -0500 Received: from mga09.intel.com ([134.134.136.24]:5333 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932162AbcCBR7O (ORCPT ); Wed, 2 Mar 2016 12:59:14 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,529,1449561600"; d="scan'208";a="756867559" Date: Wed, 2 Mar 2016 09:59:47 -0800 (PST) From: Vikas Shivappa X-X-Sender: vikas@vshiva-Udesk To: Thomas Gleixner cc: Vikas Shivappa , vikas.shivappa@intel.com, linux-kernel@vger.kernel.org, x86@kernel.org, hpa@zytor.com, mingo@kernel.org, peterz@infradead.org, ravi.v.shankar@intel.com, tony.luck@intel.com, fenghua.yu@intel.com, h.peter.anvin@intel.com Subject: Re: [PATCH 3/6] x86/mbm: Intel Memory B/W Monitoring enumeration and init In-Reply-To: Message-ID: References: <1456876108-28770-1-git-send-email-vikas.shivappa@linux.intel.com> <1456876108-28770-4-git-send-email-vikas.shivappa@linux.intel.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 614 Lines: 33 On Wed, 2 Mar 2016, Thomas Gleixner wrote: > On Tue, 1 Mar 2016, Vikas Shivappa wrote: >> @@ -1397,8 +1543,11 @@ static int __init intel_cqm_init(void) >> __perf_cpu_notifier(intel_cqm_cpu_notifier); >> out: >> cpu_notifier_register_done(); >> - if (ret) >> + if (ret) { >> + mbm_enabled = false; >> + cqm_enabled = false; >> kfree(str); > > > Leaks mbm_local and mbm_total .... Will fix. Thanks for pointing out. I missed the ones which are done at the next level of calls from the init. Will do a check on all the globals as well. Vikas > >> + } >> >> return ret; >> } >> -- >> 1.9.1 >> >> >