kprobes/x86: Release insn_slot in failure path
authorMasami Hiramatsu <mhiramat@kernel.org>
Fri, 21 Jul 2017 14:45:52 +0000 (23:45 +0900)
committerIngo Molnar <mingo@kernel.org>
Mon, 24 Jul 2017 09:14:59 +0000 (11:14 +0200)
commit38115f2f8cec8087d558c062e779c443a01f87d6
treedf0a9098d79c49399c08b2c2441a55fd5327a8c7
parentba883b4abc9cd837441b01eb9cf8d9196181294d
kprobes/x86: Release insn_slot in failure path

The following commit:

  003002e04ed3 ("kprobes: Fix arch_prepare_kprobe to handle copy insn failures")

returns an error if the copying of the instruction, but does not release
the allocated insn_slot.

Clean up correctly.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: David S . Miller <davem@davemloft.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 003002e04ed3 ("kprobes: Fix arch_prepare_kprobe to handle copy insn failures")
Link: http://lkml.kernel.org/r/150064834183.6172.11694375818447664416.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/kprobes/core.c