提交 98a05ed4 编写于 作者: A Abhishek Sagar 提交者: Ingo Molnar

ftrace: prevent ftrace modifications while being kprobe'd, v2

add two missing chunks for ftrace+kprobe.
Signed-off-by: NAbhishek Sagar <sagar.abhishek@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 760378e1
......@@ -502,8 +502,12 @@ static void ftrace_replace_code(int enable)
continue;
/* ignore updates to this record's mcount site */
if (get_kprobe((void *)rec->ip))
if (get_kprobe((void *)rec->ip)) {
freeze_record(rec);
continue;
} else {
unfreeze_record(rec);
}
failed = __ftrace_replace_code(rec, old, new, enable);
if (failed && (rec->flags & FTRACE_FL_CONVERTED)) {
......@@ -740,7 +744,10 @@ static int __ftrace_update_code(void *ignore)
ftrace_del_hash(p);
INIT_HLIST_NODE(&p->node);
hlist_add_head(&p->node, &temp_list);
freeze_record(p);
continue;
} else {
unfreeze_record(p);
}
/* convert record (i.e, patch mcount-call with NOP) */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册