From: Pan Xinhui <xinhuix.pan@intel.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
"yanmin_zhang@linux.intel.com" <yanmin_zhang@linux.intel.com>,
"mnipxh@163.com" <mnipxh@163.com>
Subject: Re: [PATCH] cpufreq: ia64: Fix a memory leak in acpi_cpufreq_cpu_exit
Date: Mon, 20 Jul 2015 16:13:40 +0800 [thread overview]
Message-ID: <55ACADB4.60102@intel.com> (raw)
In-Reply-To: <55AC9424.1070304@intel.com>
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 <xinhuix.pan@intel.com>
>
> 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 <xinhuix.pan@intel.com>
> ---
> 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);
> }
>
>
next prev parent reply other threads:[~2015-07-20 8:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-20 6:24 [PATCH] cpufreq: ia64: Fix a memory leak in acpi_cpufreq_cpu_exit Pan Xinhui
2015-07-20 8:13 ` Pan Xinhui [this message]
2015-07-23 21:05 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55ACADB4.60102@intel.com \
--to=xinhuix.pan@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mnipxh@163.com \
--cc=rafael@kernel.org \
--cc=viresh.kumar@linaro.org \
--cc=yanmin_zhang@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).