]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Fix enabling of syscall events on the command line
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Wed, 14 Jan 2015 17:53:45 +0000 (12:53 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 15 Jan 2015 14:42:50 +0000 (09:42 -0500)
commit9c77e2e0d1f71efcf19397edf305226c7ad2f7c2
tree08c2a1864c745b9f0f9765e6a1279fe55692015d
parent7ff5e5e4a3e78b1416e92baafb56b4b43c7d4700
tracing: Fix enabling of syscall events on the command line

Commit e6fc59332262 "tracing: Move enabling tracepoints to just after
rcu_init()" broke the enabling of system call events from the command
line. The reason was that the enabling of command line trace events
was moved before PID 1 started, and the syscall tracepoints require
that all tasks have the TIF_SYSCALL_TRACEPOINT flag set. But the
swapper task (pid 0) is not part of that. Since the swapper task is the
only task that is running at this early in boot, no task gets the
flag set, and the tracepoint never gets reached.

Instead of setting the swapper task flag (there should be no reason to
do that), re-enabled trace events again after the init thread (PID 1)
has been started. It requires disabling all command line events and
re-enabling them, as just enabling them again will not reset the logic
to set the TIF_SYSCALL_TRACEPOINT flag, as the syscall tracepoint will
be fooled into thinking that it was already set, and wont try setting
it again. For this reason, we must first disable it and re-enable it.

Link: http://lkml.kernel.org/r/1421188517-18312-1-git-send-email-mpe@ellerman.id.au
Link: http://lkml.kernel.org/r/20150115040506.216066449@goodmis.org
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_events.c