Skip to content

Commit fa68bd0

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
kprobe/static_call: Restore missing static_call_text_reserved()
Restore two hunks from commit: 6333e8f ("static_call: Avoid kprobes on inline static_call()s") that went walkabout in a Git merge commit. Fixes: 76d4acf ("Merge tag 'perf-kprobes-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip") Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Masami Hiramatsu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 2bee6d1 commit fa68bd0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/kprobes.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <linux/ftrace.h>
3636
#include <linux/cpu.h>
3737
#include <linux/jump_label.h>
38+
#include <linux/static_call.h>
3839
#include <linux/perf_event.h>
3940

4041
#include <asm/sections.h>
@@ -1551,6 +1552,7 @@ static int check_kprobe_address_safe(struct kprobe *p,
15511552
if (!kernel_text_address((unsigned long) p->addr) ||
15521553
within_kprobe_blacklist((unsigned long) p->addr) ||
15531554
jump_label_text_reserved(p->addr, p->addr) ||
1555+
static_call_text_reserved(p->addr, p->addr) ||
15541556
find_bug((unsigned long)p->addr)) {
15551557
ret = -EINVAL;
15561558
goto out;

0 commit comments

Comments
 (0)