From: Masami Hiramatsu Date: Tue, 28 Jul 2009 23:47:23 +0000 (-0400) Subject: kprobes: Use kernel_text_address() for checking probe address X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ec30c5f3a18722f8fcf8c83146a10b03ac4d9ff1;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git kprobes: Use kernel_text_address() for checking probe address Use kernel_text_address() for checking probe address instead of __kernel_text_address(), because __kernel_text_address() returns true for init functions even after relaseing those functions. That will hit a BUG() in text_poke(). Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Jim Keniston Signed-off-by: Linus Torvalds --- diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 16b5739c516..0540948e29a 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -694,7 +694,7 @@ int __kprobes register_kprobe(struct kprobe *p) p->addr = addr; preempt_disable(); - if (!__kernel_text_address((unsigned long) p->addr) || + if (!kernel_text_address((unsigned long) p->addr) || in_kprobes_functions((unsigned long) p->addr)) { preempt_enable(); return -EINVAL;