Commit 22047b85 authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Ralf Baechle

kprobes/mips: Fix to check double free of insn slot

Fix to check double free of insn_slot at arch_remove_kprobe
as other arches do.
Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: David Daney <ddaney@caviumnetworks.com>
Cc: Maneesh Soni <manesoni@cisco.com>
Cc: Victor Kamensky <kamensky@cisco.com>
Cc: linux-mips@linux-mips.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: yrl.pp-manager.tt@hitachi.com
Cc: systemtap@sourceware.org
Patchwork: https://patchwork.linux-mips.org/patch/5293/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 087d990b
...@@ -207,7 +207,10 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p) ...@@ -207,7 +207,10 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p)
void __kprobes arch_remove_kprobe(struct kprobe *p) void __kprobes arch_remove_kprobe(struct kprobe *p)
{ {
if (p->ainsn.insn) {
free_insn_slot(p->ainsn.insn, 0); free_insn_slot(p->ainsn.insn, 0);
p->ainsn.insn = NULL;
}
} }
static void save_previous_kprobe(struct kprobe_ctlblk *kcb) static void save_previous_kprobe(struct kprobe_ctlblk *kcb)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment