]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Set ops->old_hash on modifying what an ops hooks to
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Fri, 24 Oct 2014 18:56:01 +0000 (14:56 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 24 Oct 2014 20:33:36 +0000 (16:33 -0400)
commit11a27aeb80aefcc17a356e4636dd8d10dea505f8
tree71a1ee72107c5907ea8bd898c536ad65b0367de3
parentcf707b7b48540e4559958bc7587fb506b5c80cc1
ftrace: Set ops->old_hash on modifying what an ops hooks to

The code that checks for trampolines when modifying function hooks
tests against a modified ops "old_hash". But the ops old_hash pointer
is not being updated before the changes are made, making it possible
to not find the right hash to the callback and possibly causing
ftrace to break in accounting and disable itself.

Have the ops set its old_hash before the modifying takes place.

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