From: Namhyung Kim Date: Mon, 1 Apr 2013 12:46:23 +0000 (+0900) Subject: tracing: Fix double free when function profile init failed X-Git-Tag: v3.4.41~16 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e264d3cf890eb1ead5200731b9e3dbd1d1b71fa8;p=karo-tx-linux.git tracing: Fix double free when function profile init failed commit 83e03b3fe4daffdebbb42151d5410d730ae50bd1 upstream. 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. Link: http://lkml.kernel.org/r/1364820385-32027-1-git-send-email-namhyung@kernel.org Signed-off-by: Namhyung Kim Cc: Frederic Weisbecker Cc: Namhyung Kim Signed-off-by: Steven Rostedt Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index e539dfaf65b9..a3c1dd9fd94e 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -642,7 +642,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;