Commit ffc1b64c authored by Zong Li's avatar Zong Li Committed by Greg Kroah-Hartman
Browse files

stop_machine, rcu: Mark functions as notrace



commit 4230e2de upstream.

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
cb9d7fd5 ("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: 4ecf0a43 ("processor: get rid of cpu_relax_yield")
Fixes: 366237e7 ("stop_machine: Provide RCU quiescent state in multi_cpu_stop()")
Signed-off-by: default avatarZong Li <zong.li@sifive.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Tested-by: default avatarAtish Patra <atish.patra@wdc.com>
Tested-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
Acked-by: default avatarPaul E. McKenney <paulmck@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20201021073839.43935-1-zong.li@sifive.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7e5bf05d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment