提交 fa9d13cf 编写于 作者: Z Zhaolei 提交者: Ingo Molnar

ftrace: don't try to __ftrace_replace_code on !FTRACE_FL_CONVERTED rec

Do __ftrace_replace_code for !FTRACE_FL_CONVERTED rec will always
fail, we should ignore this rec.
Signed-off-by: NZhao Lei <zhaolei@cn.fujitsu.com>
Cc: "Steven Rostedt ;" <rostedt@goodmis.org>
LKML-Reference: <49BA2472.4060206@cn.fujitsu.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 b00f0b6d
...@@ -532,11 +532,12 @@ static void ftrace_replace_code(int enable) ...@@ -532,11 +532,12 @@ static void ftrace_replace_code(int enable)
do_for_each_ftrace_rec(pg, rec) { do_for_each_ftrace_rec(pg, rec) {
/* /*
* Skip over free records and records that have * Skip over free records, records that have
* failed. * failed and not converted.
*/ */
if (rec->flags & FTRACE_FL_FREE || if (rec->flags & FTRACE_FL_FREE ||
rec->flags & FTRACE_FL_FAILED) rec->flags & FTRACE_FL_FAILED ||
rec->flags & FTRACE_FL_CONVERTED)
continue; continue;
/* ignore updates to this record's mcount site */ /* ignore updates to this record's mcount site */
...@@ -548,7 +549,7 @@ static void ftrace_replace_code(int enable) ...@@ -548,7 +549,7 @@ static void ftrace_replace_code(int enable)
} }
failed = __ftrace_replace_code(rec, enable); failed = __ftrace_replace_code(rec, enable);
if (failed && (rec->flags & FTRACE_FL_CONVERTED)) { if (failed) {
rec->flags |= FTRACE_FL_FAILED; rec->flags |= FTRACE_FL_FAILED;
if ((system_state == SYSTEM_BOOTING) || if ((system_state == SYSTEM_BOOTING) ||
!core_kernel_text(rec->ip)) { !core_kernel_text(rec->ip)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册