Skip to content

Commit

Permalink
tracing/syscalls: Early terminate search for sys_ni_syscall
Browse files Browse the repository at this point in the history
Many system calls are unimplemented and mapped to sys_ni_syscall, but at
boot ftrace would still search through every syscall metadata entry for
a match which wouldn't be there.

This patch adds causes the search to terminate early if the system call
is not mapped.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
LKML-Reference: <1296703645-18718-7-git-send-email-imunsie@au1.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Ian Munsie authored and Steven Rostedt committed Feb 8, 2011
1 parent b2d5549 commit ae07f55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/trace/trace_syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ find_syscall_meta(unsigned long syscall)
stop = __stop_syscalls_metadata;
kallsyms_lookup(syscall, NULL, NULL, NULL, str);

if (arch_syscall_match_sym_name(str, "sys_ni_syscall"))
return NULL;

for ( ; start < stop; start++) {
if ((*start)->name && arch_syscall_match_sym_name(str, (*start)->name))
return *start;
Expand Down

0 comments on commit ae07f55

Please sign in to comment.