[tip:perf/core] kprobes: Remove pointless BUG_ON() from disarming process

From: tip-bot for Masami Hiramatsu
Date: Wed Sep 12 2018 - 02:52:24 EST


Commit-ID: d0555fc78fdba5646a460e83bd2d8249c539bb89
Gitweb: https://git.kernel.org/tip/d0555fc78fdba5646a460e83bd2d8249c539bb89
Author: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
AuthorDate: Tue, 11 Sep 2018 19:19:14 +0900
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Wed, 12 Sep 2018 08:01:15 +0200

kprobes: Remove pointless BUG_ON() from disarming process

All aggr_probes at this line are already disarmed by
disable_kprobe() or checked by kprobe_disarmed().

So this BUG_ON() is pointless, remove it.

Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@xxxxxxxxx>
Cc: David S . Miller <davem@xxxxxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Naveen N . Rao <naveen.n.rao@xxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Link: 153666115463.21306.8799008438116029806.stgit@devbox">http://lkml.kernel.org/r/153666115463.21306.8799008438116029806.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@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 @@ noclean:
return 0;

disarmed:
- BUG_ON(!kprobe_disarmed(ap));
hlist_del_rcu(&ap->hlist);
return 0;
}