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)
committerIngo Molnar <mingo@kernel.org>
Wed, 12 Sep 2018 06:01:16 +0000 (08:01 +0200)
commit819319fc93461c07b9cdb3064f154bd8cfd48172
tree1af8017bac10831354dde691e7fa974f2e6b6358
parenta6d18e65dff2b73ceeb187c598b48898e36ad7b1
kprobes: Return error if we fail to reuse kprobe instead of BUG_ON()

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>
kernel/kprobes.c