Commit ae07f551 authored by Ian Munsie's avatar Ian Munsie Committed by Steven Rostedt

tracing/syscalls: Early terminate search for sys_ni_syscall

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: default avatarIan Munsie <imunsie@au1.ibm.com>
LKML-Reference: <1296703645-18718-7-git-send-email-imunsie@au1.ibm.com>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent b2d55496
...@@ -85,6 +85,9 @@ find_syscall_meta(unsigned long syscall) ...@@ -85,6 +85,9 @@ find_syscall_meta(unsigned long syscall)
stop = __stop_syscalls_metadata; stop = __stop_syscalls_metadata;
kallsyms_lookup(syscall, NULL, NULL, NULL, str); kallsyms_lookup(syscall, NULL, NULL, NULL, str);
if (arch_syscall_match_sym_name(str, "sys_ni_syscall"))
return NULL;
for ( ; start < stop; start++) { for ( ; start < stop; start++) {
if ((*start)->name && arch_syscall_match_sym_name(str, (*start)->name)) if ((*start)->name && arch_syscall_match_sym_name(str, (*start)->name))
return *start; return *start;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment