Skip to content

Commit 36feb99

Browse files
committed
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()
2 parents c7f26a0 + d9815bf commit 36feb99

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/trace/ftrace.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,6 +1547,8 @@ static struct dyn_ftrace *lookup_rec(unsigned long start, unsigned long end)
15471547
rec = bsearch(&key, pg->records, pg->index,
15481548
sizeof(struct dyn_ftrace),
15491549
ftrace_cmp_recs);
1550+
if (rec)
1551+
break;
15501552
}
15511553
return rec;
15521554
}

0 commit comments

Comments
 (0)