Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755485AbbGTIQ0 (ORCPT ); Mon, 20 Jul 2015 04:16:26 -0400 Received: from mga01.intel.com ([192.55.52.88]:25857 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755280AbbGTIQY (ORCPT ); Mon, 20 Jul 2015 04:16:24 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,507,1432623600"; d="scan'208";a="731941842" Message-ID: <55ACADB4.60102@intel.com> Date: Mon, 20 Jul 2015 16:13:40 +0800 From: Pan Xinhui User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" CC: "Rafael J. Wysocki" , Viresh Kumar , "yanmin_zhang@linux.intel.com" , "mnipxh@163.com" Subject: Re: [PATCH] cpufreq: ia64: Fix a memory leak in acpi_cpufreq_cpu_exit References: <55AC9424.1070304@intel.com> In-Reply-To: <55AC9424.1070304@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1685 Lines: 43 hi, all ia64-acpi-cpufreq has similar issues with acpi-cpufreq. Maybe we need make other two patches. Replace struct cpufreq_acpi_io *acpi_io_data[NR_CPUS] with policy->driver_data, and Fix an acpi perf unregister issue. As two patches [1/2] Drop the unused first argument of acpi_processor_unregister_performance(). [2/2] Drop the now redundant acpi_data pointer from acpi_cpufreq_data. are going into the kernel tree, If I send my patches to you now, there will be some conflicts. So I may wait for a couple of days until all previous patches merged into kernel tree. thanks xinhui On 2015年07月20日 14:24, Pan Xinhui wrote: > From: Pan Xinhui > > freq_table should be alloced in ->init and freed in ->exit. However it > does not be freed. Fix this memory leak in acpi_cpufreq_cpu_exit. > > Signed-off-by: Pan Xinhui > --- > drivers/cpufreq/ia64-acpi-cpufreq.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq/ia64-acpi-cpufreq.c > index 27cef0c..e02bd15 100644 > --- a/drivers/cpufreq/ia64-acpi-cpufreq.c > +++ b/drivers/cpufreq/ia64-acpi-cpufreq.c > @@ -334,6 +334,7 @@ acpi_cpufreq_cpu_exit ( > acpi_io_data[policy->cpu] = NULL; > acpi_processor_unregister_performance(&data->acpi_data, > policy->cpu); > + kfree(policy->freq_table); > kfree(data); > } > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/