diff options
-rw-r--r-- | kernel/trace/ftrace.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 6ef1989c2b2e..979bd8cb4349 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -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; } |