]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: Mark watchdog touch functions as notrace
authorVincent Whitchurch <vincent.whitchurch@axis.com>
Tue, 21 Aug 2018 15:25:07 +0000 (17:25 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 30 Aug 2018 10:56:40 +0000 (12:56 +0200)
commitce14e705daca2ca4111497ec8f5a4fd396e75c70
tree617f11702e19fd0cc2f07eef3a922716476ec6b9
parentf030a7bb7b1f7de16c1c716a587185e209e25800
watchdog: Mark watchdog touch functions as notrace

Some architectures need to use stop_machine() to patch functions for
ftrace, and the assumption is that the stopped CPUs do not make function
calls to traceable functions when they are in the stopped state.

Commit a8f01c5cb1db ("stop_machine: Touch_nmi_watchdog() after
MULTI_STOP_PREPARE") added calls to the watchdog touch functions from
the stopped CPUs and those functions lack notrace annotations.  This
leads to crashes when enabling/disabling ftrace on ARM kernels built
with the Thumb-2 instruction set.

Fix it by adding the necessary notrace annotations.

Fixes: a8f01c5cb1db ("stop_machine: Touch_nmi_watchdog() after MULTI_STOP_PREPARE")
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: oleg@redhat.com
Cc: tj@kernel.org
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180821152507.18313-1-vincent.whitchurch@axis.com
kernel/watchdog.c
kernel/watchdog_hld.c
kernel/workqueue.c