diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace_syscalls.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c index 85291c4de406..cb7f600cb02a 100644 --- a/kernel/trace/trace_syscalls.c +++ b/kernel/trace/trace_syscalls.c | |||
@@ -227,6 +227,8 @@ void ftrace_syscall_enter(struct pt_regs *regs, long id) | |||
227 | int syscall_nr; | 227 | int syscall_nr; |
228 | 228 | ||
229 | syscall_nr = syscall_get_nr(current, regs); | 229 | syscall_nr = syscall_get_nr(current, regs); |
230 | if (syscall_nr < 0) | ||
231 | return; | ||
230 | if (!test_bit(syscall_nr, enabled_enter_syscalls)) | 232 | if (!test_bit(syscall_nr, enabled_enter_syscalls)) |
231 | return; | 233 | return; |
232 | 234 | ||
@@ -257,6 +259,8 @@ void ftrace_syscall_exit(struct pt_regs *regs, long ret) | |||
257 | int syscall_nr; | 259 | int syscall_nr; |
258 | 260 | ||
259 | syscall_nr = syscall_get_nr(current, regs); | 261 | syscall_nr = syscall_get_nr(current, regs); |
262 | if (syscall_nr < 0) | ||
263 | return; | ||
260 | if (!test_bit(syscall_nr, enabled_exit_syscalls)) | 264 | if (!test_bit(syscall_nr, enabled_exit_syscalls)) |
261 | return; | 265 | return; |
262 | 266 | ||