[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130522093413.9084.33395.stgit@mhiramat-M0-7522>
Date: Wed, 22 May 2013 18:34:13 +0900
From: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To: Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Cc: linux-mips@...ux-mips.org, Victor Kamensky <kamensky@...co.com>,
David Daney <ddaney@...iumnetworks.com>,
Ralf Baechle <ralf@...ux-mips.org>,
Maneesh Soni <manesoni@...co.com>,
yrl.pp-manager.tt@...achi.com, systemtap@...rceware.org
Subject: [PATCH 2/2] [BUGFIX] 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: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc: Ralf Baechle <ralf@...ux-mips.org>
Cc: David Daney <ddaney@...iumnetworks.com>
Cc: Maneesh Soni <manesoni@...co.com>
Cc: Victor Kamensky <kamensky@...co.com>
Cc: linux-mips@...ux-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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists