[PATCH -tip v2 1/5] kprobes: Remove meaningless BUG_ON from disarming process
From: Masami Hiramatsu
Date: Tue Sep 11 2018 - 06:19:40 EST
All aggr_probe at this line are already disarmed by
disable_kprobe() or checked by kprobe_disarmed().
So this BUG_ON() does meaningless check. Remove it.
Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
---
kernel/kprobes.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index ab257be4d924..d1edd8d5641e 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1704,7 +1704,6 @@ static int __unregister_kprobe_top(struct kprobe *p)
return 0;
disarmed:
- BUG_ON(!kprobe_disarmed(ap));
hlist_del_rcu(&ap->hlist);
return 0;
}