aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Munsie <imunsie@au1.ibm.com>2011-02-02 22:27:25 -0500
committerSteven Rostedt <rostedt@goodmis.org>2011-02-07 21:30:14 -0500
commitae07f551c42d6e4162436ca452a199deac9dab4d (patch)
tree88041bf32c4ee8788ef1b909539d0a42fcd9f3f9
parentb2d55496818d64310b9f5486d4eea76ea614d7f8 (diff)
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: 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>
-rw-r--r--kernel/trace/trace_syscalls.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index 86a23e7de031..ee7b5a0bb9f8 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -85,6 +85,9 @@ find_syscall_meta(unsigned long syscall)
85 stop = __stop_syscalls_metadata; 85 stop = __stop_syscalls_metadata;
86 kallsyms_lookup(syscall, NULL, NULL, NULL, str); 86 kallsyms_lookup(syscall, NULL, NULL, NULL, str);
87 87
88 if (arch_syscall_match_sym_name(str, "sys_ni_syscall"))
89 return NULL;
90
88 for ( ; start < stop; start++) { 91 for ( ; start < stop; start++) {
89 if ((*start)->name && arch_syscall_match_sym_name(str, (*start)->name)) 92 if ((*start)->name && arch_syscall_match_sym_name(str, (*start)->name))
90 return *start; 93 return *start;