]> 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)
commita61cb4ad43217ae86016635009fa4215c678833d
tree71a1ee72107c5907ea8bd898c536ad65b0367de3
parent794664fc5e82534aa444b079f807e339c4d8d9b5
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