diff options
Diffstat (limited to 'kernel/kprobes.c')
-rw-r--r-- | kernel/kprobes.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index c39790001854..c90e417bb963 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
@@ -869,7 +869,8 @@ static void __disarm_kprobe(struct kprobe *p, bool reopt) | |||
869 | { | 869 | { |
870 | struct kprobe *_p; | 870 | struct kprobe *_p; |
871 | 871 | ||
872 | unoptimize_kprobe(p, false); /* Try to unoptimize */ | 872 | /* Try to unoptimize */ |
873 | unoptimize_kprobe(p, kprobes_all_disarmed); | ||
873 | 874 | ||
874 | if (!kprobe_queued(p)) { | 875 | if (!kprobe_queued(p)) { |
875 | arch_disarm_kprobe(p); | 876 | arch_disarm_kprobe(p); |
@@ -1571,7 +1572,13 @@ static struct kprobe *__disable_kprobe(struct kprobe *p) | |||
1571 | 1572 | ||
1572 | /* Try to disarm and disable this/parent probe */ | 1573 | /* Try to disarm and disable this/parent probe */ |
1573 | if (p == orig_p || aggr_kprobe_disabled(orig_p)) { | 1574 | if (p == orig_p || aggr_kprobe_disabled(orig_p)) { |
1574 | disarm_kprobe(orig_p, true); | 1575 | /* |
1576 | * If kprobes_all_disarmed is set, orig_p | ||
1577 | * should have already been disarmed, so | ||
1578 | * skip unneed disarming process. | ||
1579 | */ | ||
1580 | if (!kprobes_all_disarmed) | ||
1581 | disarm_kprobe(orig_p, true); | ||
1575 | orig_p->flags |= KPROBE_FLAG_DISABLED; | 1582 | orig_p->flags |= KPROBE_FLAG_DISABLED; |
1576 | } | 1583 | } |
1577 | } | 1584 | } |