File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1616,12 +1616,14 @@ static struct kprobe *__disable_kprobe(struct kprobe *p)
1616
1616
/* Try to disarm and disable this/parent probe */
1617
1617
if (p == orig_p || aggr_kprobe_disabled (orig_p )) {
1618
1618
/*
1619
- * If kprobes_all_disarmed is set, orig_p
1620
- * should have already been disarmed, so
1621
- * skip unneed disarming process.
1619
+ * Don't be lazy here. Even if 'kprobes_all_disarmed'
1620
+ * is false, 'orig_p' might not have been armed yet.
1621
+ * Note arm_all_kprobes() __tries__ to arm all kprobes
1622
+ * on the best effort basis.
1622
1623
*/
1623
- if (!kprobes_all_disarmed )
1624
+ if (!kprobes_all_disarmed && ! kprobe_disabled ( orig_p ) )
1624
1625
disarm_kprobe (orig_p , true);
1626
+
1625
1627
orig_p -> flags |= KPROBE_FLAG_DISABLED ;
1626
1628
}
1627
1629
}
You can’t perform that action at this time.
0 commit comments