diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-03-11 09:54:59 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-03-11 09:54:59 -0700 |
commit | 36feb996308ec3392495e3341bab2570b11cb1bd (patch) | |
tree | 311449231513733558e0e7976fea2d5ecd366e22 /kernel | |
parent | c7f26a0ce61eb51a4849bdf3268bedd251b6dbc6 (diff) | |
parent | d9815bff6b379ff46981bea9dfeb146081eab314 (diff) | |
download | linux-36feb996308ec3392495e3341bab2570b11cb1bd.tar.gz linux-36feb996308ec3392495e3341bab2570b11cb1bd.tar.bz2 linux-36feb996308ec3392495e3341bab2570b11cb1bd.zip |
Merge tag 'trace-v5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull ftrace fix from Steven Rostedt:
"Have ftrace lookup_rec() return a consistent record otherwise it can
break live patching"
* tag 'trace-v5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
ftrace: Return the first found result in lookup_rec()
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/ftrace.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 3f7ee102868a..fd81c7de77a7 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -1547,6 +1547,8 @@ static struct dyn_ftrace *lookup_rec(unsigned long start, unsigned long end) rec = bsearch(&key, pg->records, pg->index, sizeof(struct dyn_ftrace), ftrace_cmp_recs); + if (rec) + break; } return rec; } |