summaryrefslogtreecommitdiff
path: root/fs/gfs2/glock.h
diff options
context:
space:
mode:
authorRichard Cochran <rcochran@linutronix.de>2016-04-07 00:00:53 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-04-07 23:10:57 +0300
commitca42489d9ee3262482717c83428e087322fdc39c (patch)
treee5a121d896f3800241610c64ab0eb9cd87732bb1 /fs/gfs2/glock.h
parente9df69ccd1322e87eee10f28036fad9e6c71f8dd (diff)
downloadlinux-ca42489d9ee3262482717c83428e087322fdc39c.tar.xz
intel_idle: Avoid a double free of the per-CPU data.
The helper function, intel_idle_cpuidle_devices_uninit, frees the globally allocated per-CPU data. However, this function is invoked from the hot plug notifier callback at a time when freeing that data is not safe. If the call to cpuidle_register_driver() should fail (say, due to lack of memory), then the driver will free its per-CPU region. On the *next* CPU_ONLINE event, the driver will happily use the region again and even free it again if the failure repeats. This patch fixes the issue by moving the call to free_percpu() outside of the helper function at the two call sites that actually need to free the per-CPU data. Signed-off-by: Richard Cochran <rcochran@linutronix.de> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'fs/gfs2/glock.h')
0 files changed, 0 insertions, 0 deletions