[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3545642.ato4ToQdI5@aspire.rjw.lan>
Date: Thu, 28 Mar 2019 11:14:47 +0100
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: Vincent Stehlé <vincent.stehle@...oste.net>
Cc: linux-arm-kernel@...ts.infradead.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, Sudeep Holla <sudeep.holla@....com>,
Viresh Kumar <viresh.kumar@...aro.org>
Subject: Re: [PATCH] cpufreq: scpi: fix use after free
On Wednesday, March 27, 2019 11:06:42 PM CET Vincent Stehlé wrote:
> Free the priv structure only after we are done using it.
>
> Fixes: 1690d8bb91e370ab ("cpufreq: scpi/scmi: Fix freeing of dynamic OPPs")
> Signed-off-by: Vincent Stehlé <vincent.stehle@...oste.net>
> Cc: Sudeep Holla <sudeep.holla@....com>
> Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
> Cc: Viresh Kumar <viresh.kumar@...aro.org>
> ---
> drivers/cpufreq/scpi-cpufreq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/scpi-cpufreq.c b/drivers/cpufreq/scpi-cpufreq.c
> index 3f49427766b88..2b51e0718c9f6 100644
> --- a/drivers/cpufreq/scpi-cpufreq.c
> +++ b/drivers/cpufreq/scpi-cpufreq.c
> @@ -189,8 +189,8 @@ static int scpi_cpufreq_exit(struct cpufreq_policy *policy)
>
> clk_put(priv->clk);
> dev_pm_opp_free_cpufreq_table(priv->cpu_dev, &policy->freq_table);
> - kfree(priv);
> dev_pm_opp_remove_all_dynamic(priv->cpu_dev);
> + kfree(priv);
>
> return 0;
> }
>
I've queued this one up, thanks!
Powered by blists - more mailing lists