diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-03-26 17:09:18 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-03-26 17:09:18 +0100 |
commit | f217c44ebd41ce7369d2df07622b2839479183b0 (patch) | |
tree | c8ee34e6d2b20e068c5241fbe663983ab0a1a88d /kernel/audit_watch.c | |
parent | fs: remove now stale label in anon_inode_init() (diff) | |
parent | tracing: Fix traceon trigger condition to actually turn tracing on (diff) | |
download | linux-f217c44ebd41ce7369d2df07622b2839479183b0.tar.xz linux-f217c44ebd41ce7369d2df07622b2839479183b0.zip |
Merge tag 'trace-fixes-v3.14-rc7-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fix from Steven Rostedt:
"While on my flight to Linux Collaboration Summit, I was working on my
slides for the event trigger tutorial. I booted a 3.14-rc7 kernel to
perform what I wanted to teach and cut and paste it into my slides.
When I tried the traceon event trigger with a condition attached to it
(turns tracing on only if a field of the trigger event matches a
condition set by the user), nothing happened. Tracing would not turn
on. I stopped working on my presentation in order to find what was
wrong.
It ended up being the way trace event triggers work when they have
conditions. Instead of copying the fields, the condition code just
looks at the fields that were copied into the ring buffer. This works
great, unless tracing is off. That's because when the event is
reserved on the ring buffer, the ring buffer returns a NULL pointer,
this tells the tracing code that the ring buffer is disabled. This
ends up being a problem for the traceon trigger if it is using this
information to check its condition.
Luckily the code that checks if tracing is on returns the ring buffer
to use (because the ring buffer is determined by the event file also
passed to that field). I was able to easily solve this bug by
checking in that helper function if the returned ring buffer entry is
NULL, and if so, also check the file flag if it has a trace event
trigger condition, and if so, to pass back a temp ring buffer to use.
This will allow the trace event trigger condition to still test the
event fields, but nothing will be recorded"
* tag 'trace-fixes-v3.14-rc7-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracing: Fix traceon trigger condition to actually turn tracing on
Diffstat (limited to 'kernel/audit_watch.c')
0 files changed, 0 insertions, 0 deletions