summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/kprobes/opt.c2
-rw-r--r--include/linux/kprobes.h1
-rw-r--r--kernel/kprobes.c4
3 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c
index e81adc1070f3..e37e5e82481a 100644
--- a/arch/x86/kernel/kprobes/opt.c
+++ b/arch/x86/kernel/kprobes/opt.c
@@ -346,7 +346,7 @@ int arch_check_optimized_kprobe(struct optimized_kprobe *op)
for (i = 1; i < op->optinsn.size; i++) {
p = get_kprobe(op->kp.addr + i);
- if (p && !kprobe_disabled(p))
+ if (p && !kprobe_disarmed(p))
return -EEXIST;
}
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 0ed50f1a9578..18b7c40ffb37 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -343,6 +343,7 @@ extern int proc_kprobes_optimization_handler(struct ctl_table *table,
#endif
extern void wait_for_kprobe_optimizer(void);
bool optprobe_queued_unopt(struct optimized_kprobe *op);
+bool kprobe_disarmed(struct kprobe *p);
#else
static inline void wait_for_kprobe_optimizer(void) { }
#endif /* CONFIG_OPTPROBES */
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 80a57d45f5f7..86d71c49b495 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -447,8 +447,8 @@ static inline int kprobe_optready(struct kprobe *p)
return 0;
}
-/* Return true(!0) if the kprobe is disarmed. Note: p must be on hash list */
-static inline int kprobe_disarmed(struct kprobe *p)
+/* Return true if the kprobe is disarmed. Note: p must be on hash list */
+bool kprobe_disarmed(struct kprobe *p)
{
struct optimized_kprobe *op;