diff options
author | Dmitry Monakhov <dmonakhov@openvz.org> | 2009-10-05 00:38:55 +0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2009-11-17 23:15:04 -0500 |
commit | e77b89f13a0d48aea70b69976e854f2a2444a519 (patch) | |
tree | d78288fc4386e1613713fff8c13d28f7ec480d32 /arch | |
parent | 293afe44d75abce4252db76cbb303a7de4297ce1 (diff) |
[CPUFREQ] Fix use after free on governor restore
Currently on governer backup/restore path we storing governor's pointer.
This is wrong because one may unload governor's module after cpu goes
offline. As result use-after-free will take place on restored cpu.
It is not easy to exploit this bug, but still we have to close this
issue ASAP. Issue was introduced by following commit
084f34939424161669467c19280dbcf637730314
##TESTCASE##
#!/bin/sh -x
modprobe acpi_cpufreq
# Any non default governor, in may case it is "ondemand"
modprobe cpufreq_ondemand
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
rmmod acpi_cpufreq
rmmod cpufreq_ondemand
modprobe acpi_cpufreq # << use-after-free here.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions