* [PATCH 2/2] [BUGFIX] kprobes/mips: Fix to check double free of insn slot
[not found] <20130522093409.9084.63554.stgit@mhiramat-M0-7522>
@ 2013-05-22 9:34 ` Masami Hiramatsu
2013-05-22 10:37 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Masami Hiramatsu @ 2013-05-22 9:34 UTC (permalink / raw)
To: Ingo Molnar, linux-kernel
Cc: linux-mips, Victor Kamensky, David Daney, Ralf Baechle,
Maneesh Soni, yrl.pp-manager.tt, systemtap
Fix to check double free of insn_slot at arch_remove_kprobe
as other arches do.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: David Daney <ddaney@caviumnetworks.com>
Cc: Maneesh Soni <manesoni@cisco.com>
Cc: Victor Kamensky <kamensky@cisco.com>
Cc: linux-mips@linux-mips.org
---
arch/mips/kernel/kprobes.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/mips/kernel/kprobes.c b/arch/mips/kernel/kprobes.c
index 12bc4eb..1f8187a 100644
--- a/arch/mips/kernel/kprobes.c
+++ b/arch/mips/kernel/kprobes.c
@@ -207,7 +207,10 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p)
void __kprobes arch_remove_kprobe(struct kprobe *p)
{
- free_insn_slot(p->ainsn.insn, 0);
+ if (p->ainsn.insn) {
+ free_insn_slot(p->ainsn.insn, 0);
+ p->ainsn.insn = NULL;
+ }
}
static void save_previous_kprobe(struct kprobe_ctlblk *kcb)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] [BUGFIX] kprobes/mips: Fix to check double free of insn slot
2013-05-22 9:34 ` [PATCH 2/2] [BUGFIX] kprobes/mips: Fix to check double free of insn slot Masami Hiramatsu
@ 2013-05-22 10:37 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2013-05-22 10:37 UTC (permalink / raw)
To: Masami Hiramatsu
Cc: Ingo Molnar, linux-kernel, linux-mips, Victor Kamensky,
David Daney, Maneesh Soni, yrl.pp-manager.tt, systemtap
Thanks, applied.
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-22 10:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20130522093409.9084.63554.stgit@mhiramat-M0-7522>
2013-05-22 9:34 ` [PATCH 2/2] [BUGFIX] kprobes/mips: Fix to check double free of insn slot Masami Hiramatsu
2013-05-22 10:37 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox