diff --git a/kernel/kprobes.c b/kernel/kprobes.c index c93340bae3ac..671b51782182 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -1594,7 +1594,8 @@ static int check_kprobe_address_safe(struct kprobe *p, preempt_disable(); /* Ensure it is not in reserved area nor out of text */ - if (!kernel_text_address((unsigned long) p->addr) || + if (!(core_kernel_text((unsigned long) p->addr) || + is_module_text_address((unsigned long) p->addr)) || within_kprobe_blacklist((unsigned long) p->addr) || jump_label_text_reserved(p->addr, p->addr) || find_bug((unsigned long)p->addr)) {