]> git.baikalelectronics.ru Git - kernel.git/commit
stop_machine, rcu: Mark functions as notrace
authorZong Li <zong.li@sifive.com>
Wed, 21 Oct 2020 07:38:39 +0000 (15:38 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 26 Oct 2020 11:12:27 +0000 (12:12 +0100)
commit91d9c36ce3b945140538e4c3c712c1f51f713451
treec542bc412a1c1769616b3f857ac8cc396d0674b0
parenta1fe7c755400af92f0070a66f48f00b659aeacac
stop_machine, rcu: Mark functions as notrace

Some architectures assume that the stopped CPUs don't make function calls
to traceable functions when they are in the stopped state. See also commit
ce14e705daca ("watchdog: Mark watchdog touch functions as notrace").

Violating this assumption causes kernel crashes when switching tracer on
RISC-V.

Mark rcu_momentary_dyntick_idle() and stop_machine_yield() notrace to
prevent this.

Fixes: 3e735893340d ("processor: get rid of cpu_relax_yield")
Fixes: 137a9ae983c6 ("stop_machine: Provide RCU quiescent state in multi_cpu_stop()")
Signed-off-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Atish Patra <atish.patra@wdc.com>
Tested-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Acked-by: Paul E. McKenney <paulmck@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201021073839.43935-1-zong.li@sifive.com
kernel/rcu/tree.c
kernel/stop_machine.c