lkml.org 
[lkml]   [2015]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] cpufreq: Fix possible memory leak during CPU removal
On 23-07-15, 00:27, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> After commit 9b07109f06a1 (cpufreq: Fix double addition of sysfs
> links) the second sif argument of __cpufreq_remove_dev_prepare()
> and __cpufreq_remove_dev_finish() is not used by them any more.
>
> However, there also is a problem in cpufreq_remove_dev() that
> if any of the above functions returns an error, we'll fail to
> clean up after a CPU that is going away (and it is going away
> no matter what). Moreover, error codes returned by them are
> ignored by cpufreq_cpu_callback(), so even if any of them is
> aborted and returns an error code, the caller of the notifier
> callback will not know about that.
>
> For this reason, make __cpufreq_remove_dev_prepare() and
> __cpufreq_remove_dev_finish() never fail, change them to void
> functions and drop the sif argument from them.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>
> On top of:
> http://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=bleeding-edge&id=9b07109f06a1edd6e636b1e7397157eae0e6baa4
>
> Note: The commit mentioned above is on a testing branch only
> at the moment.
>
> Well, I seem to be blind.

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

--
viresh


\
 
 \ /
  Last update: 2015-07-23 08:41    [W:0.042 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site