Commit 58940d78 authored by TinyWindzz's avatar TinyWindzz Committed by Greg Kroah-Hartman

cpufreq: scmi: Fix use-after-free in scmi_cpufreq_exit()

commit 8cbd468b upstream.

This issue was detected with the help of Coccinelle. So
change the order of function calls to fix it.

Fixes: 1690d8bb (cpufreq: scpi/scmi: Fix freeing of dynamic OPPs)
Signed-off-by: TinyWindzz's avatarYangtao Li <>
Acked-by: default avatarViresh Kumar <>
Acked-by: default avatarSudeep Holla <>
Cc: 4.20+ <> # 4.20+
Signed-off-by: default avatarRafael J. Wysocki <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 283c27e3
......@@ -187,8 +187,8 @@ static int scmi_cpufreq_exit(struct cpufreq_policy *policy)
dev_pm_opp_free_cpufreq_table(priv->cpu_dev, &policy->freq_table);
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment