1
0
Fork 0
alistair23-linux/kernel/events
Kajol Jain 760c7a948b perf: Fix task_function_call() error handling
[ Upstream commit 6d6b8b9f4f ]

The error handling introduced by commit:

  2ed6edd33a ("perf: Add cond_resched() to task_function_call()")

looses any return value from smp_call_function_single() that is not
{0, -EINVAL}. This is a problem because it will return -EXNIO when the
target CPU is offline. Worse, in that case it'll turn into an infinite
loop.

Fixes: 2ed6edd33a ("perf: Add cond_resched() to task_function_call()")
Reported-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Barret Rhoden <brho@google.com>
Tested-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Link: https://lkml.kernel.org/r/20200827064732.20860-1-kjain@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-14 10:33:05 +02:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
callchain.c perf/core: Convert to SPDX license identifiers 2019-02-04 08:46:11 +01:00
core.c perf: Fix task_function_call() error handling 2020-10-14 10:33:05 +02:00
hw_breakpoint.c perf/hw_breakpoint: Fix arch_hw_breakpoint use-before-initialization 2019-09-06 08:24:01 +02:00
internal.h perf/ring-buffer: Use regular variables for nesting 2019-05-24 09:00:11 +02:00
ring_buffer.c perf/ring-buffer: Use regular variables for nesting 2019-05-24 09:00:11 +02:00
uprobes.c uprobes: __replace_page() avoid BUG in munlock_vma_page() 2020-08-26 10:40:51 +02:00