Skip to content

Commit 3aa6014

Browse files
Jisheng ZhangKAGA-KOKO
authored andcommitted
clocksource/drivers/ti-32k: Prevent ftrace recursion
Currently ti-32k can be used as a scheduler clock. We properly marked omap_32k_read_sched_clock() as notrace but we then call another function ti_32k_read_cycles() that _wasn't_ notrace. Having a traceable function in the sched_clock() path leads to a recursion within ftrace and a kernel crash. Fix this by adding notrace attribute to the ti_32k_read_cycles() function. Signed-off-by: Jisheng Zhang <jszhang@marvell.com> Cc: daniel.lezcano@linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/20160922075621.3725-1-jszhang@marvell.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent 6982530 commit 3aa6014

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clocksource/timer-ti-32k.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static inline struct ti_32k *to_ti_32k(struct clocksource *cs)
6565
return container_of(cs, struct ti_32k, cs);
6666
}
6767

68-
static cycle_t ti_32k_read_cycles(struct clocksource *cs)
68+
static cycle_t notrace ti_32k_read_cycles(struct clocksource *cs)
6969
{
7070
struct ti_32k *ti = to_ti_32k(cs);
7171

0 commit comments

Comments
 (0)