aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kprobes.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kprobes.c')
-rw-r--r--kernel/kprobes.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 9907a03c29f6..c3340e836c37 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -44,6 +44,7 @@
44#include <linux/debugfs.h> 44#include <linux/debugfs.h>
45#include <linux/kdebug.h> 45#include <linux/kdebug.h>
46#include <linux/memory.h> 46#include <linux/memory.h>
47#include <linux/ftrace.h>
47 48
48#include <asm-generic/sections.h> 49#include <asm-generic/sections.h>
49#include <asm/cacheflush.h> 50#include <asm/cacheflush.h>
@@ -703,7 +704,8 @@ int __kprobes register_kprobe(struct kprobe *p)
703 704
704 preempt_disable(); 705 preempt_disable();
705 if (!kernel_text_address((unsigned long) p->addr) || 706 if (!kernel_text_address((unsigned long) p->addr) ||
706 in_kprobes_functions((unsigned long) p->addr)) { 707 in_kprobes_functions((unsigned long) p->addr) ||
708 ftrace_text_reserved(p->addr, p->addr)) {
707 preempt_enable(); 709 preempt_enable();
708 return -EINVAL; 710 return -EINVAL;
709 } 711 }