Files
linux/arch/s390/include/asm
Sven Schnelle 6feeee8efc s390/ftrace: fix endless recursion in function_graph tracer
The following sequence triggers a kernel stack overflow on s390x:

mount -t tracefs tracefs /sys/kernel/tracing
cd /sys/kernel/tracing
echo function_graph > current_tracer
[crash]

This is because preempt_count_{add,sub} are in the list of traced
functions, which can be demonstrated by:

echo preempt_count_add >set_ftrace_filter
echo function_graph > current_tracer
[crash]

The stack overflow happens because get_tod_clock_monotonic() gets called
by ftrace but itself calls preempt_{disable,enable}(), which leads to a
endless recursion. Fix this by using preempt_{disable,enable}_notrace().

Fixes: 011620688a ("s390/time: ensure get_clock_monotonic() returns monotonic values")
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2019-12-18 23:29:26 +01:00
..
2019-10-31 17:20:51 +01:00
2017-12-05 07:51:09 +01:00
2019-04-29 10:47:10 +02:00
2019-04-25 15:34:10 +02:00
2019-04-29 10:47:10 +02:00
2019-06-19 17:54:27 +02:00
2019-08-21 12:41:43 +02:00
2019-04-29 10:47:10 +02:00
2019-02-05 14:29:23 +01:00
2019-10-10 13:18:38 +02:00
2019-04-29 10:47:10 +02:00
2019-06-07 10:09:37 +02:00
2019-02-07 18:06:18 -08:00
2019-11-30 10:52:44 +01:00
2019-12-11 19:53:24 +01:00
2019-06-07 10:09:42 +02:00
2019-04-03 10:32:57 +02:00
2019-06-07 10:09:37 +02:00
2019-07-23 10:45:53 +02:00
2019-11-30 10:52:44 +01:00
2017-12-05 07:51:09 +01:00