summaryrefslogtreecommitdiff
path: root/fs/ocfs2/dlmfs/Makefile
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2018-12-19 16:46:44 +0100
committerSebastian Andrzej Siewior <bigeasy@linutronix.de>2018-12-19 18:20:01 +0100
commit558e18d443181eb2abd291af496599c317f6b3d3 (patch)
tree6f71c9579ca1a3c578030576e63a9951518c47e3 /fs/ocfs2/dlmfs/Makefile
parent41cf9e5bb14fbbf782e4191b792d3b898c130469 (diff)
perf/x86/intel: Delay memory deallocation until cpu_dead
intel_pmu_cpu_prepare() allocated memory for ->shared_regs among other members of struct cpu_hw_events. This memory is released in intel_pmu_cpu_dying() which is wrong. The counterpart of the intel_pmu_cpu_prepare() callback is x86_pmu_dead_cpu(). Otherwise if the CPU fails on the UP path between CPUHP_PERF_X86_PREPARE and CPUHP_AP_PERF_X86_STARTING then it won't release the memory but allocate new memory on the next attempt to online the CPU (leaking the old memory). Also, if the CPU down path fails between CPUHP_AP_PERF_X86_STARTING and CPUHP_PERF_X86_PREPARE then the CPU will go back online but never allocate the memory that was released in x86_pmu_dying_cpu(). Make the memory allocation/free symmetrical in regard to the CPU hotplug notifier by moving the deallocation to intel_pmu_cpu_dead(). This started in commit a7e3ed1e47011 ("perf: Add support for supplementary event registers"). Cc: stable@vger.kernel.org Reported-by: He Zhe <zhe.he@windriver.com> Fixes: a7e3ed1e47011 ("perf: Add support for supplementary event registers"). Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> [bigeasy: patch description] Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'fs/ocfs2/dlmfs/Makefile')
0 files changed, 0 insertions, 0 deletions