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 ce4f06dcbb5d ("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.
Showing the changes to kernel/workqueue.c (1 of 3 files). Show all
Unified · Split
| @@ -5574,7 +5574,7 @@ static void wq_watchdog_timer_fn(struct timer_list *unused) · 5573 unmodified lines | |||
| 5574 | mod_timer(&wq_watchdog_timer, jiffies + thresh); | 5574 | mod_timer(&wq_watchdog_timer, jiffies + thresh); |
| 5575 | } | 5575 | } |
| 5576 | 5576 | ||
| 5577 | void wq_watchdog_touch(int cpu) | 5577 | notrace void wq_watchdog_touch(int cpu) |
| 5578 | { | 5578 | { |
| 5579 | if (cpu >= 0) | 5579 | if (cpu >= 0) |
| 5580 | per_cpu(wq_watchdog_touched_cpu, cpu) = jiffies; | 5580 | per_cpu(wq_watchdog_touched_cpu, cpu) = jiffies; |