[PATCH] tracing/core: fix early free of cpumasks

From: Frederic Weisbecker
Date: Sun Mar 15 2009 - 20:45:25 EST


Impact: fix weird bugs with 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@xxxxxxx>
Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
---
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);
--
1.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/