ftrace: Using FTRACE_WARN_ON() to check "freed record" in ftrace_release()
commit2a4efa42450762cbfa5c5712aa4cc9f06924c9fd
authorZhaolei <zhaolei@cn.fujitsu.com>
Wed, 25 Mar 2009 04:06:05 +0000 (25 12:06 +0800)
committerSteven Rostedt <srostedt@redhat.com>
Wed, 25 Mar 2009 21:45:36 +0000 (25 17:45 -0400)
tree70af0a079541af99dec634fc89ce317dee2f1a33
parent759ee0915dd713361e72facb78b66600b5712d65
ftrace: Using FTRACE_WARN_ON() to check "freed record" in ftrace_release()

 "Because when we call ftrace_free_rec we change the rec->ip to point to the
  next record in the chain. Something is very wrong if rec->ip >= s &&
  rec->ip < e and the record is already free."

 "Note, use FTRACE_WARN_ON() macro. This way it shuts down ftrace if it is
  hit and helps to avoid further damage later."
                   -- Steven Rostedt <rostedt@goodmis.org>

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
kernel/trace/ftrace.c