diff options
Diffstat (limited to 'kernel/trace/trace_syscalls.c')
-rw-r--r-- | kernel/trace/trace_syscalls.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c index 96fc73369099..6b245f64c8dd 100644 --- a/kernel/trace/trace_syscalls.c +++ b/kernel/trace/trace_syscalls.c | |||
@@ -506,6 +506,8 @@ static void perf_syscall_enter(void *ignore, struct pt_regs *regs, long id) | |||
506 | int size; | 506 | int size; |
507 | 507 | ||
508 | syscall_nr = syscall_get_nr(current, regs); | 508 | syscall_nr = syscall_get_nr(current, regs); |
509 | if (syscall_nr < 0) | ||
510 | return; | ||
509 | if (!test_bit(syscall_nr, enabled_perf_enter_syscalls)) | 511 | if (!test_bit(syscall_nr, enabled_perf_enter_syscalls)) |
510 | return; | 512 | return; |
511 | 513 | ||
@@ -532,7 +534,7 @@ static void perf_syscall_enter(void *ignore, struct pt_regs *regs, long id) | |||
532 | (unsigned long *)&rec->args); | 534 | (unsigned long *)&rec->args); |
533 | 535 | ||
534 | head = this_cpu_ptr(sys_data->enter_event->perf_events); | 536 | head = this_cpu_ptr(sys_data->enter_event->perf_events); |
535 | perf_trace_buf_submit(rec, size, rctx, 0, 1, regs, head); | 537 | perf_trace_buf_submit(rec, size, rctx, 0, 1, regs, head, NULL); |
536 | } | 538 | } |
537 | 539 | ||
538 | int perf_sysenter_enable(struct ftrace_event_call *call) | 540 | int perf_sysenter_enable(struct ftrace_event_call *call) |
@@ -580,6 +582,8 @@ static void perf_syscall_exit(void *ignore, struct pt_regs *regs, long ret) | |||
580 | int size; | 582 | int size; |
581 | 583 | ||
582 | syscall_nr = syscall_get_nr(current, regs); | 584 | syscall_nr = syscall_get_nr(current, regs); |
585 | if (syscall_nr < 0) | ||
586 | return; | ||
583 | if (!test_bit(syscall_nr, enabled_perf_exit_syscalls)) | 587 | if (!test_bit(syscall_nr, enabled_perf_exit_syscalls)) |
584 | return; | 588 | return; |
585 | 589 | ||
@@ -608,7 +612,7 @@ static void perf_syscall_exit(void *ignore, struct pt_regs *regs, long ret) | |||
608 | rec->ret = syscall_get_return_value(current, regs); | 612 | rec->ret = syscall_get_return_value(current, regs); |
609 | 613 | ||
610 | head = this_cpu_ptr(sys_data->exit_event->perf_events); | 614 | head = this_cpu_ptr(sys_data->exit_event->perf_events); |
611 | perf_trace_buf_submit(rec, size, rctx, 0, 1, regs, head); | 615 | perf_trace_buf_submit(rec, size, rctx, 0, 1, regs, head, NULL); |
612 | } | 616 | } |
613 | 617 | ||
614 | int perf_sysexit_enable(struct ftrace_event_call *call) | 618 | int perf_sysexit_enable(struct ftrace_event_call *call) |