tracing/core: fix early free of cpumasks
authorFrederic Weisbecker <fweisbec@gmail.com>
Mon, 16 Mar 2009 00:45:03 +0000 (01:45 +0100)
committerChris Wright <chrisw@sous-sol.org>
Mon, 27 Apr 2009 17:36:52 +0000 (10:36 -0700)
upstream commit: 2fc1dfbe17e7705c55b7a99da995fa565e26f151

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>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
kernel/trace/trace.c

index 17bb88d86ac2fead9cb0bacc72a338c2d8d798c4..b2387c04afd6a004e73a076fc3069183a35882b6 100644 (file)
@@ -3886,7 +3886,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_cpumask);