From: tip-bot for Jisheng Zhang <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org,
rostedt@goodmis.org, linux-kernel@vger.kernel.org,
jszhang@marvell.com
Subject: [tip:timers/core] clocksource/drivers/ti-32k: Prevent ftrace recursion
Date: Thu, 22 Sep 2016 07:54:47 -0700 [thread overview]
Message-ID: <tip-3aa601492babdf3acdec89e5aa9c44e1a357a4d8@git.kernel.org> (raw)
In-Reply-To: <20160922075621.3725-1-jszhang@marvell.com>
Commit-ID: 3aa601492babdf3acdec89e5aa9c44e1a357a4d8
Gitweb: http://git.kernel.org/tip/3aa601492babdf3acdec89e5aa9c44e1a357a4d8
Author: Jisheng Zhang <jszhang@marvell.com>
AuthorDate: Thu, 22 Sep 2016 15:56:21 +0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 22 Sep 2016 16:49:19 +0200
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 | 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);
prev parent reply other threads:[~2016-09-22 14:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 7:56 [PATCH] clocksource/drivers/ti-32k: Prevent ftrace recursion Jisheng Zhang
2016-09-22 13:58 ` Thomas Gleixner
2016-09-22 14:29 ` Steven Rostedt
2016-09-23 2:04 ` Jisheng Zhang
2016-09-23 2:45 ` Steven Rostedt
2016-09-23 2:48 ` Jisheng Zhang
2016-09-22 14:54 ` tip-bot for Jisheng Zhang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-3aa601492babdf3acdec89e5aa9c44e1a357a4d8@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=jszhang@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox