summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-02-20 18:30:42 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2016-02-20 18:30:42 +0100
commit06b74c658c595e4ef9fd5746f927a1cb6c3a59d5 (patch)
treeae0c008775cd86c61db12c79ba2cbe47ba77dc2e /arch/x86
parentMerge tag 'powerpc-4.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/po... (diff)
parentperf/core: Plug potential memory leak in CPU_UP_PREPARE (diff)
downloadlinux-06b74c658c595e4ef9fd5746f927a1cb6c3a59d5.tar.xz
linux-06b74c658c595e4ef9fd5746f927a1cb6c3a59d5.zip
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar: "A handful of CPU hotplug related fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Plug potential memory leak in CPU_UP_PREPARE perf/core: Remove the bogus and dangerous CPU_DOWN_FAILED hotplug state perf/core: Remove bogus UP_CANCELED hotplug state perf/x86/amd/uncore: Plug reference leak
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/cpu/perf_event_amd_uncore.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_amd_uncore.c b/arch/x86/kernel/cpu/perf_event_amd_uncore.c
index 49742746a6c9..8836fc9fa84b 100644
--- a/arch/x86/kernel/cpu/perf_event_amd_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_amd_uncore.c
@@ -323,6 +323,8 @@ static int amd_uncore_cpu_up_prepare(unsigned int cpu)
return 0;
fail:
+ if (amd_uncore_nb)
+ *per_cpu_ptr(amd_uncore_nb, cpu) = NULL;
kfree(uncore_nb);
return -ENOMEM;
}