diff options
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/ftrace.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 9b7c54f8a62f..1843edc098a6 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -453,7 +453,7 @@ static void ftrace_shutdown_replenish(void) | |||
453 | ftrace_pages->next = (void *)get_zeroed_page(GFP_KERNEL); | 453 | ftrace_pages->next = (void *)get_zeroed_page(GFP_KERNEL); |
454 | } | 454 | } |
455 | 455 | ||
456 | static void | 456 | static int |
457 | ftrace_code_disable(struct dyn_ftrace *rec) | 457 | ftrace_code_disable(struct dyn_ftrace *rec) |
458 | { | 458 | { |
459 | unsigned long ip; | 459 | unsigned long ip; |
@@ -469,7 +469,9 @@ ftrace_code_disable(struct dyn_ftrace *rec) | |||
469 | if (failed) { | 469 | if (failed) { |
470 | rec->flags |= FTRACE_FL_FAILED; | 470 | rec->flags |= FTRACE_FL_FAILED; |
471 | ftrace_free_rec(rec); | 471 | ftrace_free_rec(rec); |
472 | return 0; | ||
472 | } | 473 | } |
474 | return 1; | ||
473 | } | 475 | } |
474 | 476 | ||
475 | static int __ftrace_modify_code(void *data) | 477 | static int __ftrace_modify_code(void *data) |
@@ -617,8 +619,8 @@ static int __ftrace_update_code(void *ignore) | |||
617 | 619 | ||
618 | /* all CPUS are stopped, we are safe to modify code */ | 620 | /* all CPUS are stopped, we are safe to modify code */ |
619 | hlist_for_each_entry(p, t, &head, node) { | 621 | hlist_for_each_entry(p, t, &head, node) { |
620 | ftrace_code_disable(p); | 622 | if (ftrace_code_disable(p)) |
621 | ftrace_update_cnt++; | 623 | ftrace_update_cnt++; |
622 | } | 624 | } |
623 | 625 | ||
624 | } | 626 | } |