提交 31d4c528 编写于 作者: V Vincent Stehlé 提交者: Rafael J. Wysocki

cpufreq: scpi: Fix use after free

Free the priv structure only after we are done using it.

Fixes: 1690d8bb ("cpufreq: scpi/scmi: Fix freeing of dynamic OPPs")
Signed-off-by: NVincent Stehlé <vincent.stehle@laposte.net>
Cc: 4.20+ <stable@vger.kernel.org> # 4.20+
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 92a3e426
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册