-
- if (!syscall_table->sc_filter) {
- syscall_table->sc_filter = kzalloc(sizeof(struct lttng_syscall_filter),
- GFP_KERNEL);
- if (!syscall_table->sc_filter)
- return -ENOMEM;
- }
-
- if (!syscall_table->sys_enter_registered) {
- ret = lttng_wrapper_tracepoint_probe_register("sys_enter",
- (void *) syscall_entry_event_probe, syscall_table);
- if (ret)
- return ret;
- syscall_table->sys_enter_registered = 1;
- }
- /*
- * We change the name of sys_exit tracepoint due to namespace
- * conflict with sys_exit syscall entry.
- */
- if (!syscall_table->sys_exit_registered) {
- ret = lttng_wrapper_tracepoint_probe_register("sys_exit",
- (void *) syscall_exit_event_probe, syscall_table);
- if (ret) {
- WARN_ON_ONCE(lttng_wrapper_tracepoint_probe_unregister("sys_enter",
- (void *) syscall_entry_event_probe, syscall_table));
- return ret;
- }
- syscall_table->sys_exit_registered = 1;
- }