lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOqmu80zZ3u+XUUaDedpNoziaSVZ_Qbc38yhy4aYVSF1riSfHQ@mail.gmail.com>
Date:	Wed, 21 May 2014 13:36:31 +0530
From:	Inderpal Singh <inderpal.s@...sung.com>
To:	Viresh Kumar <viresh.kumar@...aro.org>
Cc:	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Nishanth Menon <nm@...com>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Pavel Machek <pavel@....cz>
Subject: Re: [PATCH v2] PM / OPP: Implement opp_remove and free_opp_table functions

On Wed, May 21, 2014 at 1:25 PM, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> On 21 May 2014 11:21, Inderpal Singh <inderpal.s@...sung.com> wrote:
>> At the driver unloading time the associated opps and its table may need
>> to be deleted. Otherwise it amounts to memory leak. The existing
>> OPP library does not have provision to do so.
>>
>> Hence this patch implements the required functions to free the same.
>>
>> Signed-off-by: Inderpal Singh <inderpal.s@...sung.com>
>> ---
>> Changes in v2:
>>         - As suggested by Nishanth, added support to remove a single OPP
>>           for non-DT users
>>         - Added an internal helper function to avoid the code duplication
>>           between opp_remove and free_opp_table functions
>>
>>  drivers/base/power/opp.c | 122 ++++++++++++++++++++++++++++++++++++++++++++++-
>>  include/linux/pm_opp.h   |  14 +++++-
>>  2 files changed, 134 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
>> index faae9cf..22adef3 100644
>> --- a/drivers/base/power/opp.c
>> +++ b/drivers/base/power/opp.c
>> @@ -89,6 +89,7 @@ struct device_opp {
>>         struct device *dev;
>>         struct srcu_notifier_head head;
>>         struct list_head opp_list;
>> +       struct rcu_head head_rcu;
>
> This isn't used ...

Its being used in opp_remove_and_free function to free dev_opp with kfree_rcu.

>
>>  };
>>
>>  /*
>> @@ -427,7 +428,6 @@ int dev_pm_opp_add(struct device *dev, unsigned long freq, unsigned long u_volt)
>>                                 __func__);
>>                         return -ENOMEM;
>>                 }
>> -
>
> Unrelated change.

Ahhh, missed it. Thanks for pointing.

> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ