kprobes: Return error if we fail to reuse kprobe instead of BUG_ON()
authorMasami Hiramatsu <mhiramat@kernel.org>
Tue, 11 Sep 2018 10:20:40 +0000 (19:20 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:14:55 +0000 (11:14 -0800)
commit0e0b860fffa41ecca0004da3bed908b7c6fbfcfb
tree4db1ca945d3066e5a485d98f6c6c57bec0711160
parentd4d73f1fd8ec1f7c0581f177154a36b5acebb4f1
kprobes: Return error if we fail to reuse kprobe instead of BUG_ON()

[ Upstream commit 819319fc93461c07b9cdb3064f154bd8cfd48172 ]

Make reuse_unused_kprobe() to return error code if
it fails to reuse unused kprobe for optprobe instead
of calling BUG_ON().

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: David S . Miller <davem@davemloft.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Naveen N . Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/153666124040.21306.14150398706331307654.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/kprobes.c