diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 05fef05263de1a54250f0065a110a5138ad04a6e..2be52a2d24ad6689a0c5d843d829e4592e5ddabe 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1568,7 +1568,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)) {