]> 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)
commit1715737fc095cf4f1fc283a3ddd61615f5ad4b92
treeca3ae1796ca1d3f01f2bb62eba1fbc93db1affae
parent5527a5e70cfbe832fab2c1097d1ca52cdb805d90
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