]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - kernel/trace/ftrace.c
Merge tag 'trace-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[thirdparty/linux.git] / kernel / trace / ftrace.c
index 29baa97d0d534284237a4376dda1d88aca6f7c06..9b2803c7a18f8e54fe99b02bd22794d0e52f58d8 100644 (file)
@@ -1564,7 +1564,8 @@ static struct dyn_ftrace *lookup_rec(unsigned long start, unsigned long end)
        key.flags = end;        /* overload flags, as it is unsigned long */
 
        for (pg = ftrace_pages_start; pg; pg = pg->next) {
-               if (end < pg->records[0].ip ||
+               if (pg->index == 0 ||
+                   end < pg->records[0].ip ||
                    start >= (pg->records[pg->index - 1].ip + MCOUNT_INSN_SIZE))
                        continue;
                rec = bsearch(&key, pg->records, pg->index,