[PATCH v3 11/22] rcu: Mark the Tiny RCU rcu_is_watching() notrace

From: Song Liu

Date: Mon Nov 30 2026 - 23:25:36 EST


ftrace_test_recursion_trylock() calls rcu_is_watching() before it has
taken the recursion lock. The Tree RCU version is a notrace function,
but the Tiny RCU version is a plain inline function. An out-of-line copy
of it is untraced only because inline implies notrace.

Mark it notrace explicitly. No functional change.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Song Liu <song@xxxxxxxxxx>
---
include/linux/rcutiny.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index e56ded733b1b..38a3427de0c7 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -123,7 +123,7 @@ static inline void rcu_preempt_deferred_qs(struct task_struct *t) { }
void rcu_scheduler_starting(void);
static inline void rcu_end_inkernel_boot(void) { }
static inline bool rcu_inkernel_boot_has_ended(void) { return true; }
-static inline bool rcu_is_watching(void) { return true; }
+static inline bool notrace rcu_is_watching(void) { return true; }
static inline void rcu_momentary_eqs(void) { }

/* Avoid RCU read-side critical sections leaking across. */
--
2.53.1-Meta