]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Balance records when updating the hash
authorSteven Rostedt <srostedt@redhat.com>
Wed, 13 Jul 2011 19:03:44 +0000 (15:03 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 14 Jul 2011 02:00:50 +0000 (22:00 -0400)
commit876817e04e5b1051b6d83bbb60fbf2b9bcdac3ca
treeca3ae1796ca1d3f01f2bb62eba1fbc93db1affae
parent020da7d6e7c3c9772663bc2ff1c5824fe6c06dcd
ftrace: Balance records when updating the hash

Whenever the hash of the ftrace_ops is updated, the record counts
must be balance. This requires disabling the records that are set
in the original hash, and then enabling the records that are set
in the updated hash.

Moving the update into ftrace_hash_move() removes the bug where the
hash was updated but the records were not, which results in ftrace
triggering a warning and disabling itself because the ftrace_ops filter
is updated while the ftrace_ops was registered, and then the failure
happens when the ftrace_ops is unregistered.

The current code will not trigger this bug, but new code will.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ftrace.c