diff options
-rw-r--r-- | include/linux/syscalls.h | 4 | ||||
-rw-r--r-- | kernel/trace/trace_syscalls.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 207466a49f3d..ed353d274a77 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -143,7 +143,7 @@ struct perf_event_attr; | |||
143 | .name = "sys_enter"#sname, \ | 143 | .name = "sys_enter"#sname, \ |
144 | .system = "syscalls", \ | 144 | .system = "syscalls", \ |
145 | .event = &enter_syscall_print_##sname, \ | 145 | .event = &enter_syscall_print_##sname, \ |
146 | .raw_init = trace_event_raw_init, \ | 146 | .raw_init = init_syscall_trace, \ |
147 | .show_format = syscall_enter_format, \ | 147 | .show_format = syscall_enter_format, \ |
148 | .define_fields = syscall_enter_define_fields, \ | 148 | .define_fields = syscall_enter_define_fields, \ |
149 | .regfunc = reg_event_syscall_enter, \ | 149 | .regfunc = reg_event_syscall_enter, \ |
@@ -165,7 +165,7 @@ struct perf_event_attr; | |||
165 | .name = "sys_exit"#sname, \ | 165 | .name = "sys_exit"#sname, \ |
166 | .system = "syscalls", \ | 166 | .system = "syscalls", \ |
167 | .event = &exit_syscall_print_##sname, \ | 167 | .event = &exit_syscall_print_##sname, \ |
168 | .raw_init = trace_event_raw_init, \ | 168 | .raw_init = init_syscall_trace, \ |
169 | .show_format = syscall_exit_format, \ | 169 | .show_format = syscall_exit_format, \ |
170 | .define_fields = syscall_exit_define_fields, \ | 170 | .define_fields = syscall_exit_define_fields, \ |
171 | .regfunc = reg_event_syscall_exit, \ | 171 | .regfunc = reg_event_syscall_exit, \ |
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c index 1352b0a36fac..a78e86349ecb 100644 --- a/kernel/trace/trace_syscalls.c +++ b/kernel/trace/trace_syscalls.c | |||
@@ -450,14 +450,14 @@ int init_syscall_trace(struct ftrace_event_call *call) | |||
450 | if (set_syscall_print_fmt(call) < 0) | 450 | if (set_syscall_print_fmt(call) < 0) |
451 | return -ENOMEM; | 451 | return -ENOMEM; |
452 | 452 | ||
453 | id = register_ftrace_event(call->event); | 453 | id = trace_event_raw_init(call); |
454 | if (!id) { | 454 | |
455 | if (id < 0) { | ||
455 | free_syscall_print_fmt(call); | 456 | free_syscall_print_fmt(call); |
456 | return -ENODEV; | 457 | return id; |
457 | } | 458 | } |
458 | call->id = id; | 459 | |
459 | INIT_LIST_HEAD(&call->fields); | 460 | return id; |
460 | return 0; | ||
461 | } | 461 | } |
462 | 462 | ||
463 | int __init init_ftrace_syscalls(void) | 463 | int __init init_ftrace_syscalls(void) |