diff options
-rw-r--r-- | kernel/trace/ftrace.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index d5bd21f39524..3940c71ac2a2 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -488,8 +488,12 @@ static void ftrace_replace_code(int enable) | |||
488 | for (i = 0; i < pg->index; i++) { | 488 | for (i = 0; i < pg->index; i++) { |
489 | rec = &pg->records[i]; | 489 | rec = &pg->records[i]; |
490 | 490 | ||
491 | /* don't modify code that has already faulted */ | 491 | /* |
492 | if (rec->flags & FTRACE_FL_FAILED) | 492 | * Skip over free records and records that have |
493 | * failed. | ||
494 | */ | ||
495 | if (rec->flags & FTRACE_FL_FREE || | ||
496 | rec->flags & FTRACE_FL_FAILED) | ||
493 | continue; | 497 | continue; |
494 | 498 | ||
495 | /* ignore updates to this record's mcount site */ | 499 | /* ignore updates to this record's mcount site */ |