linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] tracing: Fix double free when function profile init failed
@ 2013-04-01 12:46 Namhyung Kim
  2013-04-01 12:46 ` [PATCH 2/3] tracing: Fix off-by-one on allocating stat->pages Namhyung Kim
  2013-04-01 12:46 ` [PATCH 3/3] ftrace: Constify ftrace_profile_bits Namhyung Kim
  0 siblings, 2 replies; 7+ messages in thread
From: Namhyung Kim @ 2013-04-01 12:46 UTC (permalink / raw)
  To: Steven Rostedt, Frederic Weisbecker; +Cc: LKML, Namhyung Kim

From: Namhyung Kim <namhyung.kim@lge.com>

On the failure path, stat->start and stat->pages will refer same page.
So it'll attempt to free the same page again and get kernel panic.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 kernel/trace/ftrace.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 25770824598f..65bc47472b1b 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -694,7 +694,6 @@ int ftrace_profile_pages_init(struct ftrace_profile_stat *stat)
 		free_page(tmp);
 	}
 
-	free_page((unsigned long)stat->pages);
 	stat->pages = NULL;
 	stat->start = NULL;
 
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-04-10  0:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-01 12:46 [PATCH 1/3] tracing: Fix double free when function profile init failed Namhyung Kim
2013-04-01 12:46 ` [PATCH 2/3] tracing: Fix off-by-one on allocating stat->pages Namhyung Kim
2013-04-01 12:46 ` [PATCH 3/3] ftrace: Constify ftrace_profile_bits Namhyung Kim
2013-04-09 22:58   ` Steven Rostedt
2013-04-09 23:03   ` Steven Rostedt
2013-04-09 23:55     ` [PATCH v2 3/3] ftrace: Get rid of ftrace_profile_bits Namhyung Kim
2013-04-10  0:15       ` Steven Rostedt

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).