summaryrefslogtreecommitdiff
path: root/kernel/trace/trace_output.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-06-02 01:51:28 (GMT)
committerSteven Rostedt <rostedt@goodmis.org>2009-06-02 03:26:23 (GMT)
commit0f6ce3de4ef6ff940308087c49760d068851c1a7 (patch)
tree26a732ee4dd5b0f5612f0385893ec483c6ba4ab3 /kernel/trace/trace_output.c
parent112f38a7e36e9d688b389507136bf3af3e6d159b (diff)
downloadlinux-fsl-qoriq-0f6ce3de4ef6ff940308087c49760d068851c1a7.tar.xz
ftrace: do not profile functions when disabled
A race was found that if one were to enable and disable the function profiler repeatedly, then the system can panic. This was because a profiled function may be preempted just before disabling interrupts. While the profiler is disabled and then reenabled, the preempted function could start again, and access the hash as it is being initialized. This just adds a check in the irq disabled part to check if the profiler is enabled, and if it is not then it will just exit. When the system is disabled, the profile_enabled variable is cleared before calling the unregistering of the function profiler. This unregistering calls stop machine which also acts as a synchronize schedule. [ Impact: fix panic in enabling/disabling function profiler ] Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_output.c')
0 files changed, 0 insertions, 0 deletions