From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757404AbcIVOzD (ORCPT ); Thu, 22 Sep 2016 10:55:03 -0400 Received: from terminus.zytor.com ([198.137.202.10]:58858 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756871AbcIVOzC (ORCPT ); Thu, 22 Sep 2016 10:55:02 -0400 Date: Thu, 22 Sep 2016 07:54:47 -0700 From: tip-bot for Jisheng Zhang Message-ID: Cc: hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org, rostedt@goodmis.org, linux-kernel@vger.kernel.org, jszhang@marvell.com Reply-To: rostedt@goodmis.org, jszhang@marvell.com, linux-kernel@vger.kernel.org, mingo@kernel.org, hpa@zytor.com, tglx@linutronix.de In-Reply-To: <20160922075621.3725-1-jszhang@marvell.com> References: <20160922075621.3725-1-jszhang@marvell.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] clocksource/drivers/ti-32k: Prevent ftrace recursion Git-Commit-ID: 3aa601492babdf3acdec89e5aa9c44e1a357a4d8 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 3aa601492babdf3acdec89e5aa9c44e1a357a4d8 Gitweb: http://git.kernel.org/tip/3aa601492babdf3acdec89e5aa9c44e1a357a4d8 Author: Jisheng Zhang AuthorDate: Thu, 22 Sep 2016 15:56:21 +0800 Committer: Thomas Gleixner 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 Cc: daniel.lezcano@linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20160922075621.3725-1-jszhang@marvell.com Signed-off-by: Thomas Gleixner --- 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);