]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource/drivers/ti-32k: Prevent ftrace recursion
authorJisheng Zhang <jszhang@marvell.com>
Thu, 22 Sep 2016 07:56:21 +0000 (15:56 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 22 Sep 2016 14:49:19 +0000 (16:49 +0200)
commit80f25076dfc88c0d80b767576df4303ff36ef4a3
treedfa01762981d88df47f2459fba13f5713e527f81
parentde63800cb9c29e87026adc9985b7e8f04cfe75bd
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>
drivers/clocksource/timer-ti-32k.c