]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/kprobes.c
x86_64: disable srat when numa emulation succeeds
[linux-2.6-omap-h63xx.git] / kernel / kprobes.c
index 9e47d8c493f3a7638d06892b2835ad87c859f7bf..3e9f513a728d4a4211ca819c894c3624d74973c4 100644 (file)
@@ -675,9 +675,18 @@ static struct notifier_block kprobe_exceptions_nb = {
        .priority = 0x7fffffff /* we need to be notified first */
 };
 
+unsigned long __weak arch_deref_entry_point(void *entry)
+{
+       return (unsigned long)entry;
+}
 
 int __kprobes register_jprobe(struct jprobe *jp)
 {
+       unsigned long addr = arch_deref_entry_point(jp->entry);
+
+       if (!kernel_text_address(addr))
+               return -EINVAL;
+
        /* Todo: Verify probepoint is a function entry point */
        jp->kp.pre_handler = setjmp_pre_handler;
        jp->kp.break_handler = longjmp_break_handler;