Merge tag 'locking-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / kernel / kprobes.c
index 471b1d18a92fc17e5df6a63122dbeb6a260d8fce..790a573bbe00c6f6b2afd27dc8fac862d222ec9b 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/ftrace.h>
 #include <linux/cpu.h>
 #include <linux/jump_label.h>
+#include <linux/static_call.h>
 #include <linux/perf_event.h>
 
 #include <asm/sections.h>
@@ -1561,6 +1562,7 @@ static int check_kprobe_address_safe(struct kprobe *p,
        if (!kernel_text_address((unsigned long) p->addr) ||
            within_kprobe_blacklist((unsigned long) p->addr) ||
            jump_label_text_reserved(p->addr, p->addr) ||
+           static_call_text_reserved(p->addr, p->addr) ||
            find_bug((unsigned long)p->addr)) {
                ret = -EINVAL;
                goto out;