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

Changed files
+3 -3
arch
x86
kernel
events
+2
arch/x86/kernel/cpu/perf_event_amd_uncore.c
··· 323 323 return 0; 324 324 325 325 fail: 326 + if (amd_uncore_nb) 327 + *per_cpu_ptr(amd_uncore_nb, cpu) = NULL; 326 328 kfree(uncore_nb); 327 329 return -ENOMEM; 328 330 }
+1 -3
kernel/events/core.c
··· 9206 9206 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); 9207 9207 9208 9208 mutex_lock(&swhash->hlist_mutex); 9209 - if (swhash->hlist_refcount > 0) { 9209 + if (swhash->hlist_refcount > 0 && !swevent_hlist_deref(swhash)) { 9210 9210 struct swevent_hlist *hlist; 9211 9211 9212 9212 hlist = kzalloc_node(sizeof(*hlist), GFP_KERNEL, cpu_to_node(cpu)); ··· 9282 9282 switch (action & ~CPU_TASKS_FROZEN) { 9283 9283 9284 9284 case CPU_UP_PREPARE: 9285 - case CPU_DOWN_FAILED: 9286 9285 perf_event_init_cpu(cpu); 9287 9286 break; 9288 9287 9289 - case CPU_UP_CANCELED: 9290 9288 case CPU_DOWN_PREPARE: 9291 9289 perf_event_exit_cpu(cpu); 9292 9290 break;