Prev: [PATCH 03/40] ftrace syscalls: Allow arch specific syscall symbol matching
Next: [PATCH 09/40] tracing: move __start_ftrace_events and __stop_ftrace_events to header file
From: Ian Munsie on 23 Jun 2010 06:20 From: Ian Munsie <imunsie(a)au1.ibm.com> With the new compat syscall tracing, either syscall_nr or compat_syscall_nr may be set, so test both before assuming that the initialisation failed. Signed-off-by: Ian Munsie <imunsie(a)au1.ibm.com> --- kernel/trace/trace_syscalls.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c index 9010405..264441e 100644 --- a/kernel/trace/trace_syscalls.c +++ b/kernel/trace/trace_syscalls.c @@ -441,10 +441,12 @@ void unreg_event_syscall_exit(struct ftrace_event_call *call) int init_syscall_trace(struct ftrace_event_call *call) { int id; - int num; + int num, compat_num; num = ((struct syscall_metadata *)call->data)->syscall_nr; - if (num < 0 || num >= NR_syscalls) { + compat_num = ((struct syscall_metadata *)call->data)->compat_syscall_nr; + if (( num < 0 || num >= NR_syscalls) && + (compat_num < 0 || compat_num >= NR_syscalls)) { pr_debug("syscall %s metadata not mapped, disabling ftrace event\n", ((struct syscall_metadata *)call->data)->name); return -ENOSYS; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |