Pull ftrace fix from Steven Rostedt: "Back in 3.16 the ftrace code was redesigned and cleaned up to remove the double iteration list (one for registered ftrace ops, and one for registered "global" ops), to just use one list. That simplified the code but also broke the function tracing filtering on pid. This updates the code to handle the filtering again with the new logic" * tag 'trace-v4.2-rc2-fix3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Fix breakage of set_ftrace_pid
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -116,6 +116,7 @@ ftrace_func_t ftrace_ops_get_func(struct ftrace_ops *ops); · 115 unmodified lines | |||
| 116 | * SAVE_REGS. If another ops with this flag set is already registered | 116 | * SAVE_REGS. If another ops with this flag set is already registered |
| 117 | * for any of the functions that this ops will be registered for, then | 117 | * for any of the functions that this ops will be registered for, then |
| 118 | * this ops will fail to register or set_filter_ip. | 118 | * this ops will fail to register or set_filter_ip. |
| 119 | * PID - Is affected by set_ftrace_pid (allows filtering on those pids) | ||
| 119 | */ | 120 | */ |
| 120 | enum { | 121 | enum { |
| 121 | FTRACE_OPS_FL_ENABLED = 1 << 0, | 122 | FTRACE_OPS_FL_ENABLED = 1 << 0, |
| @@ -132,6 +133,7 @@ enum { · 10 unmodified lines | |||
| 132 | FTRACE_OPS_FL_MODIFYING = 1 << 11, | 133 | FTRACE_OPS_FL_MODIFYING = 1 << 11, |
| 133 | FTRACE_OPS_FL_ALLOC_TRAMP = 1 << 12, | 134 | FTRACE_OPS_FL_ALLOC_TRAMP = 1 << 12, |
| 134 | FTRACE_OPS_FL_IPMODIFY = 1 << 13, | 135 | FTRACE_OPS_FL_IPMODIFY = 1 << 13, |
| 136 | FTRACE_OPS_FL_PID = 1 << 14, | ||
| 135 | }; | 137 | }; |
| 136 | 138 | ||
| 137 | #ifdef CONFIG_DYNAMIC_FTRACE | 139 | #ifdef CONFIG_DYNAMIC_FTRACE |
| @@ -159,6 +161,7 @@ struct ftrace_ops { · 21 unmodified lines | |||
| 159 | struct ftrace_ops *next; | 161 | struct ftrace_ops *next; |
| 160 | unsigned long flags; | 162 | unsigned long flags; |
| 161 | void *private; | 163 | void *private; |
| 164 | ftrace_func_t saved_func; | ||
| 162 | int __percpu *disabled; | 165 | int __percpu *disabled; |
| 163 | #ifdef CONFIG_DYNAMIC_FTRACE | 166 | #ifdef CONFIG_DYNAMIC_FTRACE |
| 164 | int nr_trampolines; | 167 | int nr_trampolines; |