summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasami Hiramatsu2009-07-29 01:47:23 +0200
committerLinus Torvalds2009-07-31 01:44:06 +0200
commitec30c5f3a18722f8fcf8c83146a10b03ac4d9ff1 (patch)
treefc343f7f608f4db5475abfdc8bbad3b0cfef69fd
parentAlan doesn't want to maintain tty code any more (diff)
downloadkernel-qcow2-linux-ec30c5f3a18722f8fcf8c83146a10b03ac4d9ff1.tar.gz
kernel-qcow2-linux-ec30c5f3a18722f8fcf8c83146a10b03ac4d9ff1.tar.xz
kernel-qcow2-linux-ec30c5f3a18722f8fcf8c83146a10b03ac4d9ff1.zip
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 <mhiramat@redhat.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Jim Keniston <jkenisto@us.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--kernel/kprobes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 16b5739c516a..0540948e29ab 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;