All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clocksource/drivers/ti-32k: Prevent ftrace recursion
@ 2016-09-22  7:56 ` Jisheng Zhang
  0 siblings, 0 replies; 13+ messages in thread
From: Jisheng Zhang @ 2016-09-22  7:56 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 drivers/clocksource/timer-ti-32k.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-ti-32k.c b/drivers/clocksource/timer-ti-32k.c
index 92b7e39..cf5b14e 100644
--- a/drivers/clocksource/timer-ti-32k.c
+++ b/drivers/clocksource/timer-ti-32k.c
@@ -65,7 +65,7 @@ static inline struct ti_32k *to_ti_32k(struct clocksource *cs)
 	return container_of(cs, struct ti_32k, cs);
 }
 
-static cycle_t ti_32k_read_cycles(struct clocksource *cs)
+static cycle_t notrace ti_32k_read_cycles(struct clocksource *cs)
 {
 	struct ti_32k *ti = to_ti_32k(cs);
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-09-23  2:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-22  7:56 [PATCH] clocksource/drivers/ti-32k: Prevent ftrace recursion Jisheng Zhang
2016-09-22  7:56 ` Jisheng Zhang
2016-09-22 13:58 ` Thomas Gleixner
2016-09-22 13:58   ` Thomas Gleixner
2016-09-22 14:29   ` Steven Rostedt
2016-09-22 14:29     ` Steven Rostedt
2016-09-23  2:04   ` Jisheng Zhang
2016-09-23  2:04     ` Jisheng Zhang
2016-09-23  2:45     ` Steven Rostedt
2016-09-23  2:45       ` Steven Rostedt
2016-09-23  2:48       ` Jisheng Zhang
2016-09-23  2:48         ` Jisheng Zhang
2016-09-22 14:54 ` [tip:timers/core] " tip-bot for Jisheng Zhang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.