]> Git Repo - linux.git/commitdiff
rcu: Fix rcu_dynticks_curr_cpu_in_eqs() vs noinstr
authorPeter Zijlstra <[email protected]>
Tue, 28 Sep 2021 08:40:22 +0000 (10:40 +0200)
committerPaul E. McKenney <[email protected]>
Thu, 7 Oct 2021 17:00:07 +0000 (10:00 -0700)
  vmlinux.o: warning: objtool: rcu_nmi_enter()+0x36: call to __kasan_check_read() leaves .noinstr.text section

noinstr cannot have atomic_*() functions in because they're explicitly
annotated, use arch_atomic_*().

Fixes: 2be57f732889 ("rcu: Weaken ->dynticks accesses and updates")
Reported-by: Stephen Rothwell <[email protected]>
Reviewed-by: Thomas Gleixner <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
kernel/rcu/tree.c

index 6a1e9d3374db62c5d3b347ba5c2dfad8709ca4c8..ef8d36f580fc358614dfbcd95264c454fda09feb 100644 (file)
@@ -327,7 +327,7 @@ static void rcu_dynticks_eqs_online(void)
  */
 static __always_inline bool rcu_dynticks_curr_cpu_in_eqs(void)
 {
-       return !(atomic_read(this_cpu_ptr(&rcu_data.dynticks)) & 0x1);
+       return !(arch_atomic_read(this_cpu_ptr(&rcu_data.dynticks)) & 0x1);
 }
 
 /*
This page took 0.065418 seconds and 4 git commands to generate.