[PATCH] kprobes: bugfix: checks kprobes_all_disarmed in unoptimized_kprobe().
Wang Nan
wangnan0 at huawei.com
Mon Jan 12 04:09:23 PST 2015
Original code failed to disarm the probed instruction after
echo 0 > /sys/kernel/debug/kprobes/enabled
if OPTPROBE is enabled.
This patch checks kprobes_all_disarmed in unoptimized_kprobe().
Signed-off-by: Wang Nan <wangnan0 at huawei.com>
---
kernel/kprobes.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 9471710..f16936b 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -630,6 +630,9 @@ static void unoptimize_kprobe(struct kprobe *p, bool force)
{
struct optimized_kprobe *op;
+ if (kprobes_all_disarmed)
+ return;
+
if (!kprobe_aggrprobe(p) || kprobe_disarmed(p))
return; /* This is not an optprobe nor optimized */
--
1.8.4
More information about the linux-arm-kernel
mailing list