rcu: Remove spurious instrumentation_end() in rcu_nmi_enter()
authorZhouyi Zhou <zhouzhouyi@gmail.com>
Mon, 11 Jan 2021 01:08:59 +0000 (09:08 +0800)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 8 Mar 2021 22:17:35 +0000 (14:17 -0800)
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 <neeraju@codeaurora.org>
Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree.c

index e62c2defae987bbe4b6bcfa65dae1e33b250df95..4d90f202ef4a6ae6b70723ea304b17f96ad31595 100644 (file)
@@ -1076,7 +1076,6 @@ noinstr void rcu_nmi_enter(void)
        } else if (!in_nmi()) {
                instrumentation_begin();
                rcu_irq_enter_check_tick();
-               instrumentation_end();
        } else  {
                instrumentation_begin();
        }