提交 dc6f03f2 编写于 作者: S Steven Rostedt (Red Hat) 提交者: Steven Rostedt

ftrace: Add warning if tramp hash does not match nr_trampolines

After adding all the records to the tramp_hash, add a check that makes
sure that the number of records added matches the number of records
expected to match and do a WARN_ON and disable ftrace if they do
not match.
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
上级 2a0343ba
......@@ -2226,6 +2226,9 @@ static int ftrace_save_ops_tramp_hash(struct ftrace_ops *ops)
}
} while_for_each_ftrace_rec();
/* The number of recs in the hash must match nr_trampolines */
FTRACE_WARN_ON(ops->tramp_hash->count != ops->nr_trampolines);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册