Skip to content

Commit 5cacd18

Browse files
Peter Zijlstragregkh
authored andcommitted
rcu,ftrace: Fix ftrace recursion
[ Upstream commit d2098b4 ] Kim reported that perf-ftrace made his box unhappy. It turns out that commit: ff5c4f5 ("rcu/tree: Mark the idle relevant functions noinstr") removed one too many notrace qualifiers, probably due to there not being a helpful comment. This commit therefore reinstates the notrace and adds a comment to avoid losing it again. [ paulmck: Apply Steven Rostedt's feedback on the comment. ] Fixes: ff5c4f5 ("rcu/tree: Mark the idle relevant functions noinstr") Reported-by: Kim Phillips <kim.phillips@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 4540e84 commit 5cacd18

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎kernel/rcu/tree.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,8 +1093,11 @@ static void rcu_disable_urgency_upon_qs(struct rcu_data *rdp)
10931093
* CPU can safely enter RCU read-side critical sections. In other words,
10941094
* if the current CPU is not in its idle loop or is in an interrupt or
10951095
* NMI handler, return true.
1096+
*
1097+
* Make notrace because it can be called by the internal functions of
1098+
* ftrace, and making this notrace removes unnecessary recursion calls.
10961099
*/
1097-
bool rcu_is_watching(void)
1100+
notrace bool rcu_is_watching(void)
10981101
{
10991102
bool ret;
11001103

0 commit comments

Comments
 (0)