From: Zhouyi Zhou Date: Mon, 11 Jan 2021 01:08:59 +0000 (+0800) Subject: rcu: Remove spurious instrumentation_end() in rcu_nmi_enter() X-Git-Tag: v5.11.21~286 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d79181f4e28ce9f058247dc5e18b1b5f1b74c83;p=thirdparty%2Fkernel%2Fstable.git rcu: Remove spurious instrumentation_end() in rcu_nmi_enter() [ Upstream commit 6494ccb93271bee596a12db32ff44867d5be2321 ] In rcu_nmi_enter(), there is an erroneous instrumentation_end() in the second branch of the "if" statement. Oddly enough, "objtool check -f vmlinux.o" fails to complain because it is unable to correctly cover all cases. Instead, objtool visits the third branch first, which marks following trace_rcu_dyntick() as visited. This commit therefore removes the spurious instrumentation_end(). Fixes: 04b25a495bd6 ("rcu: Mark rcu_nmi_enter() call to rcu_cleanup_after_idle() noinstr") Reported-by Neeraj Upadhyay Signed-off-by: Zhouyi Zhou Signed-off-by: Paul E. McKenney Signed-off-by: Sasha Levin --- diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 84a3fe09630b3..e7d8a0d8ea7cc 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -1072,7 +1072,6 @@ noinstr void rcu_nmi_enter(void) } else if (!in_nmi()) { instrumentation_begin(); rcu_irq_enter_check_tick(); - instrumentation_end(); } else { instrumentation_begin(); }