lkml.org 
[lkml]   [2009]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:tracing/syscalls] tracing/core: fix early free of cpumasks
Commit-ID:  2fc1dfbe17e7705c55b7a99da995fa565e26f151
Gitweb: http://git.kernel.org/tip/2fc1dfbe17e7705c55b7a99da995fa565e26f151
Author: Frederic Weisbecker <fweisbec@gmail.com>
AuthorDate: Mon, 16 Mar 2009 01:45:03 +0100
Commit: Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 16 Mar 2009 09:13:18 +0100

tracing/core: fix early free of cpumasks

Impact: fix crashes when tracing cpumasks

While ring-buffer allocation, the cpumasks are allocated too,
including the tracing cpumask and the per-cpu file mask handler.
But these cpumasks are freed accidentally just after.
Fix it.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1237164303-11476-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
kernel/trace/trace.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index c0cf946..ae32d3b 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4125,7 +4125,8 @@ __init static int tracer_alloc_buffers(void)
&trace_panic_notifier);

register_die_notifier(&trace_die_notifier);
- ret = 0;
+
+ return 0;

out_free_cpumask:
free_cpumask_var(tracing_reader_cpumask);

\
 
 \ /
  Last update: 2009-03-16 09:25    [W:0.051 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site