]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cpufreq: scmi: Fix use-after-free in scmi_cpufreq_exit()
authorYangtao Li <tiny.windzz@gmail.com>
Sat, 16 Feb 2019 16:31:48 +0000 (11:31 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Feb 2019 09:09:55 +0000 (10:09 +0100)
commit58940d7855f12381cb44368d106061ff327c0405
tree5a0b63a8f47839fdd5da96a02d407f6ba5784346
parent283c27e398a8f6f6177fa521843eea7ceca3829e
cpufreq: scmi: Fix use-after-free in scmi_cpufreq_exit()

commit 8cbd468bdeb5ed3acac2d7a9f7494d5b77e46297 upstream.

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

Fixes: 1690d8bb91e37 (cpufreq: scpi/scmi: Fix freeing of dynamic OPPs)
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Cc: 4.20+ <stable@vger.kernel.org> # 4.20+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/cpufreq/scmi-cpufreq.c