mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 14:41:39 +00:00
tracing: Fix double free when function profile init failed
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 Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: stable@vger.kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
395b97a3ae
commit
83e03b3fe4
@ -694,7 +694,6 @@ int ftrace_profile_pages_init(struct ftrace_profile_stat *stat)
|
|||||||
free_page(tmp);
|
free_page(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
free_page((unsigned long)stat->pages);
|
|
||||||
stat->pages = NULL;
|
stat->pages = NULL;
|
||||||
stat->start = NULL;
|
stat->start = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user