summaryrefslogtreecommitdiff
path: root/kernel/trace/ftrace.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-10-04 04:03:49 (GMT)
committerAlex Shi <alex.shi@linaro.org>2017-10-04 04:03:49 (GMT)
commita38b2dd146c0bba28633fe857f0c4626e0c691cc (patch)
tree2d81121c3690a36a3679bc78552067eee74c2c81 /kernel/trace/ftrace.c
parent7ecc9777c5c76d7b31c376ffd4f59c4a85472a1b (diff)
parentd59dabdc4cb380b79c965af28cd4ba001f04834b (diff)
downloadlinux-a38b2dd146c0bba28633fe857f0c4626e0c691cc.tar.xz
Merge tag 'v4.9.52' into linux-linaro-lsk-v4.9
This is the 4.9.52 stable release
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r--kernel/trace/ftrace.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 6e432ed..53ed8ae 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2747,13 +2747,14 @@ static int ftrace_shutdown(struct ftrace_ops *ops, int command)
if (!command || !ftrace_enabled) {
/*
- * If these are per_cpu ops, they still need their
- * per_cpu field freed. Since, function tracing is
+ * If these are dynamic or per_cpu ops, they still
+ * need their data freed. Since, function tracing is
* not currently active, we can just free them
* without synchronizing all CPUs.
*/
- if (ops->flags & FTRACE_OPS_FL_PER_CPU)
- per_cpu_ops_free(ops);
+ if (ops->flags & (FTRACE_OPS_FL_DYNAMIC | FTRACE_OPS_FL_PER_CPU))
+ goto free_ops;
+
return 0;
}
@@ -2808,6 +2809,7 @@ static int ftrace_shutdown(struct ftrace_ops *ops, int command)
if (ops->flags & (FTRACE_OPS_FL_DYNAMIC | FTRACE_OPS_FL_PER_CPU)) {
schedule_on_each_cpu(ftrace_sync);
+ free_ops:
arch_ftrace_trampoline_free(ops);
if (ops->flags & FTRACE_OPS_FL_PER_CPU)