drivers/net/can/pch_can.c ae64438be192 ("can: dev: fix skb drop check") 1dd1b521be85 ("can: remove obsolete PCH CAN driver") https://lore.kernel.org/all/20221110102509.1f7d63cc@canb.auug.org.au/
Showing the changes to kernel/trace (4 of 385 files). Show all
Unified · Split
| @@ -141,6 +141,8 @@ static int fprobe_init_rethook(struct fprobe *fp, int num) · 140 unmodified lines | |||
| 141 | return -E2BIG; | 141 | return -E2BIG; |
| 142 | 142 | ||
| 143 | fp->rethook = rethook_alloc((void *)fp, fprobe_exit_handler); | 143 | fp->rethook = rethook_alloc((void *)fp, fprobe_exit_handler); |
| 144 | if (!fp->rethook) | ||
| 145 | return -ENOMEM; | ||
| 144 | for (i = 0; i < size; i++) { | 146 | for (i = 0; i < size; i++) { |
| 145 | struct fprobe_rethook_node *node; | 147 | struct fprobe_rethook_node *node; |
| 146 | 148 | ||
| @@ -301,7 +303,8 @@ int unregister_fprobe(struct fprobe *fp) · 154 unmodified lines | |||
| 301 | { | 303 | { |
| 302 | int ret; | 304 | int ret; |
| 303 | 305 | ||
| 304 | if (!fp || fp->ops.func != fprobe_handler) | 306 | if (!fp || (fp->ops.saved_func != fprobe_handler && |
| 307 | fp->ops.saved_func != fprobe_kprobe_handler)) | ||
| 305 | return -EINVAL; | 308 | return -EINVAL; |
| 306 | 309 | ||
| 307 | /* | 310 | /* |
| @@ -3028,18 +3028,8 @@ int ftrace_shutdown(struct ftrace_ops *ops, int command) · 3027 unmodified lines | |||
| 3028 | command |= FTRACE_UPDATE_TRACE_FUNC; | 3028 | command |= FTRACE_UPDATE_TRACE_FUNC; |
| 3029 | } | 3029 | } |
| 3030 | 3030 | ||
| 3031 | if (!command || !ftrace_enabled) { | 3031 | if (!command || !ftrace_enabled) |
| 3032 | /* | 3032 | goto out; |
| 3033 | * If these are dynamic or per_cpu ops, they still | ||
| 3034 | * need their data freed. Since, function tracing is | ||
| 3035 | * not currently active, we can just free them | ||
| 3036 | * without synchronizing all CPUs. | ||
| 3037 | */ | ||
| 3038 | if (ops->flags & FTRACE_OPS_FL_DYNAMIC) | ||
| 3039 | goto free_ops; | ||
| 3040 | |||
| 3041 | return 0; | ||
| 3042 | } | ||
| 3043 | 3033 | ||
| 3044 | /* | 3034 | /* |
| 3045 | * If the ops uses a trampoline, then it needs to be | 3035 | * If the ops uses a trampoline, then it needs to be |
| @@ -3076,6 +3066,7 @@ int ftrace_shutdown(struct ftrace_ops *ops, int command) · 30 unmodified lines | |||
| 3076 | removed_ops = NULL; | 3066 | removed_ops = NULL; |
| 3077 | ops->flags &= ~FTRACE_OPS_FL_REMOVING; | 3067 | ops->flags &= ~FTRACE_OPS_FL_REMOVING; |
| 3078 | 3068 | ||
| 3069 | out: | ||
| 3079 | /* | 3070 | /* |
| 3080 | * Dynamic ops may be freed, we must make sure that all | 3071 | * Dynamic ops may be freed, we must make sure that all |
| 3081 | * callers are done before leaving this function. | 3072 | * callers are done before leaving this function. |
| @@ -3103,7 +3094,6 @@ int ftrace_shutdown(struct ftrace_ops *ops, int command) · 21 unmodified lines | |||
| 3103 | if (IS_ENABLED(CONFIG_PREEMPTION)) | 3094 | if (IS_ENABLED(CONFIG_PREEMPTION)) |
| 3104 | synchronize_rcu_tasks(); | 3095 | synchronize_rcu_tasks(); |
| 3105 | 3096 | ||
| 3106 | free_ops: | ||
| 3107 | ftrace_trampoline_free(ops); | 3097 | ftrace_trampoline_free(ops); |
| 3108 | } | 3098 | } |
| 3109 | 3099 | ||
| @@ -100,20 +100,20 @@ static int __init test_gen_kprobe_cmd(void) · 99 unmodified lines | |||
| 100 | KPROBE_GEN_TEST_FUNC, | 100 | KPROBE_GEN_TEST_FUNC, |
| 101 | KPROBE_GEN_TEST_ARG0, KPROBE_GEN_TEST_ARG1); | 101 | KPROBE_GEN_TEST_ARG0, KPROBE_GEN_TEST_ARG1); |
| 102 | if (ret) | 102 | if (ret) |
| 103 | goto free; | 103 | goto out; |
| 104 | 104 | ||
| 105 | /* Use kprobe_event_add_fields to add the rest of the fields */ | 105 | /* Use kprobe_event_add_fields to add the rest of the fields */ |
| 106 | 106 | ||
| 107 | ret = kprobe_event_add_fields(&cmd, KPROBE_GEN_TEST_ARG2, KPROBE_GEN_TEST_ARG3); | 107 | ret = kprobe_event_add_fields(&cmd, KPROBE_GEN_TEST_ARG2, KPROBE_GEN_TEST_ARG3); |
| 108 | if (ret) | 108 | if (ret) |
| 109 | goto free; | 109 | goto out; |
| 110 | 110 | ||
| 111 | /* | 111 | /* |
| 112 | * This actually creates the event. | 112 | * This actually creates the event. |
| 113 | */ | 113 | */ |
| 114 | ret = kprobe_event_gen_cmd_end(&cmd); | 114 | ret = kprobe_event_gen_cmd_end(&cmd); |
| 115 | if (ret) | 115 | if (ret) |
| 116 | goto free; | 116 | goto out; |
| 117 | 117 | ||
| 118 | /* | 118 | /* |
| 119 | * Now get the gen_kprobe_test event file. We need to prevent | 119 | * Now get the gen_kprobe_test event file. We need to prevent |
| @@ -136,13 +136,11 @@ static int __init test_gen_kprobe_cmd(void) · 16 unmodified lines | |||
| 136 | goto delete; | 136 | goto delete; |
| 137 | } | 137 | } |
| 138 | out: | 138 | out: |
| 139 | kfree(buf); | ||
| 139 | return ret; | 140 | return ret; |
| 140 | delete: | 141 | delete: |
| 141 | /* We got an error after creating the event, delete it */ | 142 | /* We got an error after creating the event, delete it */ |
| 142 | ret = kprobe_event_delete("gen_kprobe_test"); | 143 | ret = kprobe_event_delete("gen_kprobe_test"); |
| 143 | free: | ||
| 144 | kfree(buf); | ||
| 145 | |||
| 146 | goto out; | 144 | goto out; |
| 147 | } | 145 | } |
| 148 | 146 | ||
| @@ -170,14 +168,14 @@ static int __init test_gen_kretprobe_cmd(void) · 21 unmodified lines | |||
| 170 | KPROBE_GEN_TEST_FUNC, | 168 | KPROBE_GEN_TEST_FUNC, |
| 171 | "$retval"); | 169 | "$retval"); |
| 172 | if (ret) | 170 | if (ret) |
| 173 | goto free; | 171 | goto out; |
| 174 | 172 | ||
| 175 | /* | 173 | /* |
| 176 | * This actually creates the event. | 174 | * This actually creates the event. |
| 177 | */ | 175 | */ |
| 178 | ret = kretprobe_event_gen_cmd_end(&cmd); | 176 | ret = kretprobe_event_gen_cmd_end(&cmd); |
| 179 | if (ret) | 177 | if (ret) |
| 180 | goto free; | 178 | goto out; |
| 181 | 179 | ||
| 182 | /* | 180 | /* |
| 183 | * Now get the gen_kretprobe_test event file. We need to | 181 | * Now get the gen_kretprobe_test event file. We need to |
| @@ -201,13 +199,11 @@ static int __init test_gen_kretprobe_cmd(void) · 17 unmodified lines | |||
| 201 | goto delete; | 199 | goto delete; |
| 202 | } | 200 | } |
| 203 | out: | 201 | out: |
| 202 | kfree(buf); | ||
| 204 | return ret; | 203 | return ret; |
| 205 | delete: | 204 | delete: |
| 206 | /* We got an error after creating the event, delete it */ | 205 | /* We got an error after creating the event, delete it */ |
| 207 | ret = kprobe_event_delete("gen_kretprobe_test"); | 206 | ret = kprobe_event_delete("gen_kretprobe_test"); |
| 208 | free: | ||
| 209 | kfree(buf); | ||
| 210 | |||
| 211 | goto out; | 207 | goto out; |
| 212 | } | 208 | } |
| 213 | 209 | ||
| @@ -937,6 +937,9 @@ void ring_buffer_wake_waiters(struct trace_buffer *buffer, int cpu) · 936 unmodified lines | |||
| 937 | struct ring_buffer_per_cpu *cpu_buffer; | 937 | struct ring_buffer_per_cpu *cpu_buffer; |
| 938 | struct rb_irq_work *rbwork; | 938 | struct rb_irq_work *rbwork; |
| 939 | 939 | ||
| 940 | if (!buffer) | ||
| 941 | return; | ||
| 942 | |||
| 940 | if (cpu == RING_BUFFER_ALL_CPUS) { | 943 | if (cpu == RING_BUFFER_ALL_CPUS) { |
| 941 | 944 | ||
| 942 | /* Wake up individual ones too. One level recursion */ | 945 | /* Wake up individual ones too. One level recursion */ |
| @@ -945,7 +948,15 @@ void ring_buffer_wake_waiters(struct trace_buffer *buffer, int cpu) · 2 unmodified lines | |||
| 945 | 948 | ||
| 946 | rbwork = &buffer->irq_work; | 949 | rbwork = &buffer->irq_work; |
| 947 | } else { | 950 | } else { |
| 951 | if (WARN_ON_ONCE(!buffer->buffers)) | ||
| 952 | return; | ||
| 953 | if (WARN_ON_ONCE(cpu >= nr_cpu_ids)) | ||
| 954 | return; | ||
| 955 | |||
| 948 | cpu_buffer = buffer->buffers[cpu]; | 956 | cpu_buffer = buffer->buffers[cpu]; |
| 957 | /* The CPU buffer may not have been initialized yet */ | ||
| 958 | if (!cpu_buffer) | ||
| 959 | return; | ||
| 949 | rbwork = &cpu_buffer->irq_work; | 960 | rbwork = &cpu_buffer->irq_work; |
| 950 | } | 961 | } |
| 951 | 962 | ||