[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2ffd8863-9ea9-85dd-60a9-035d21e2ee11@arm.com>
Date: Thu, 4 Mar 2021 17:27:46 +0000
From: Lukasz Luba <lukasz.luba@....com>
To: Beata Michalska <beata.michalska@....com>,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Cc: vireshk@...nel.org, nm@...com, sboyd@...nel.org
Subject: Re: [PATCH] opp: Invalidate current opp when draining the opp list
Hi Beata,
On 3/4/21 3:07 PM, Beata Michalska wrote:
> The current_opp when set, grabs additional reference on the opp,
> which is then supposed to be dropped upon releasing the opp table.
> Still both dev_pm_opp_remove_table and dev_pm_opp_remove_all_dynamic
> will completely drain the OPPs list, including dropping the additional
> reference on current_opp. This may lead to an attempt to access
> memory that has already been released. Make sure that while draining
> the list (in both dynamic and static cases) the current_opp gets
> actually invalidated.
>
> Fixes: 81c4d8a3c414 ("opp: Keep track of currently programmed OPP")
>
> Signed-off-by: Beata Michalska <beata.michalska@....com>
> ---
> drivers/opp/core.c | 49 ++++++++++++++++++++++++++++++++-----------------
> 1 file changed, 32 insertions(+), 17 deletions(-)
The change looks good.
Reviewed-by: Lukasz Luba <lukasz.luba@....com>
Regards,
Lukasz
Powered by blists - more mailing lists