diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-06-01 21:51:28 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-06-01 23:26:23 -0400 |
commit | 0f6ce3de4ef6ff940308087c49760d068851c1a7 (patch) | |
tree | 26a732ee4dd5b0f5612f0385893ec483c6ba4ab3 /firmware/cpia2 | |
parent | 112f38a7e36e9d688b389507136bf3af3e6d159b (diff) |
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 'firmware/cpia2')
0 files changed, 0 insertions, 0 deletions