linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kprobes: *ap before *op otherwise ap pointer will be Dangling
@ 2012-08-23 17:43 Akhilesh Kumar
  0 siblings, 0 replies; only message in thread
From: Akhilesh Kumar @ 2012-08-23 17:43 UTC (permalink / raw)
  To: ananth, anil.s.keshavamurthy, davem, masami.hiramatsu.pt; +Cc: linux-kernel

>From a77438899c7295299b59edca8d1816ea70d6ed8e Mon Sep 17 00:00:00 2001
From: Akhilesh Kumar <akhilesh.lxr@gmail.com>
Date: Fri, 23 Aug 2012 23:02:07 +0530
Subject:[PATCH] kprobes: *ap before *op otherwise ap pointer will be Dangling

Free *ap before *op otherwise ap pointer will be Dangling

Signed-off-by: Akhilesh Kumar <akhilesh.lxr@gmail.com>
---
 kernel/kprobes.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index c62b854..ff0a97b 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -767,6 +767,7 @@ static __kprobes void
try_to_optimize_kprobe(struct kprobe *p)
 	if (!arch_prepared_optinsn(&op->optinsn)) {
 		/* If failed to setup optimizing, fallback to kprobe */
 		arch_remove_optimized_kprobe(op);
+		kfree(ap);
 		kfree(op);
 		return;
 	}
-- 
1.7.8.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-08-23 17:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-23 17:43 [PATCH] kprobes: *ap before *op otherwise ap pointer will be Dangling Akhilesh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).