From: Arnd Bergmann Date: Mon, 2 Feb 2026 09:55:01 +0000 (+0100) Subject: rcu: Mark lockdep_assert_rcu_helper() __always_inline X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=451c3a0356099483218535aed17fcf94ab5764a3;p=thirdparty%2Flinux.git rcu: Mark lockdep_assert_rcu_helper() __always_inline There are some configurations in which lockdep_assert_rcu_helper() ends up not being inlined, for some reason. This leads to a link failure because now the caller tries to pass a nonexistant __ctx_lock_RCU structure: ld: lib/test_context-analysis.o: in function `test_rcu_assert_variants': test_context-analysis.c:(.text+0x275c): undefined reference to `RCU' ld: test_context-analysis.c:(.text+0x276c): undefined reference to `RCU_BH' ld: test_context-analysis.c:(.text+0x2774): undefined reference to `RCU_SCHED' I saw this in one out of many 32-bit arm builds using gcc-15.2, but it probably happens in others as well. Mark this function as __always_inline to fix the build. Fixes: fe00f6e84621 ("rcu: Support Clang's context analysis") Signed-off-by: Arnd Bergmann Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Paul E. McKenney Link: https://patch.msgid.link/20260202095507.1237440-1-arnd@kernel.org --- diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index d828a46734410..f0aa48bb5d12d 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -435,7 +435,7 @@ static inline void rcu_preempt_sleep_check(void) { } // See RCU_LOCKDEP_WARN() for an explanation of the double call to // debug_lockdep_rcu_enabled(). -static inline bool lockdep_assert_rcu_helper(bool c, const struct __ctx_lock_RCU *ctx) +static __always_inline bool lockdep_assert_rcu_helper(bool c, const struct __ctx_lock_RCU *ctx) __assumes_shared_ctx_lock(RCU) __assumes_shared_ctx_lock(ctx) { return debug_lockdep_rcu_enabled() &&