Skip to content

Commit 27ca923

Browse files
KAGA-KOKOIngo Molnar
authored andcommitted
perf/core: Remove the bogus and dangerous CPU_DOWN_FAILED hotplug state
If CPU_DOWN_PREPARE fails the perf hotplug notifier is called for CPU_DOWN_FAILED and calls perf_event_init_cpu(), which checks whether the swhash is referenced. If yes it allocates a new hash and stores the pointer in the per cpu data structure. But at this point the cpu is still online, so there must be a valid hash already. By overwriting the pointer the existing hash is not longer accessible. Remove the CPU_DOWN_FAILED state, as there is nothing to (re)allocate. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Vince Weaver <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent b4f75d4 commit 27ca923

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

kernel/events/core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9282,7 +9282,6 @@ perf_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu)
92829282
switch (action & ~CPU_TASKS_FROZEN) {
92839283

92849284
case CPU_UP_PREPARE:
9285-
case CPU_DOWN_FAILED:
92869285
perf_event_init_cpu(cpu);
92879286
break;
92889287

0 commit comments

Comments
 (0)