[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090402011232.GA32066@goodmis.org>
Date: Wed, 1 Apr 2009 21:12:32 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: mingo@...hat.com, hpa@...or.com, linux-kernel@...r.kernel.org,
fweisbec@...il.com, tglx@...utronix.de, mingo@...e.hu,
Johannes Berg <johannes@...solutions.net>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg KH <gregkh@...e.de>
Cc: linux-tip-commits@...r.kernel.org, stable@...nel.org
Subject: Re: [tip:tracing/syscalls] tracing/core: fix early free of cpumasks
This never made it into 2.6.29, nor do I see it yet in mainline.
This can cause unpredictable results with ftrace. We are freeing a cpu mask
that will be later used.
This is definitely stable material.
Thanks to Johannes Berg for patiently bisecting his branch with a merge of my
branch to locate the patch that was missing from mainline.
He was seeing empty traces, but in reality, the changing of these masks might
have more dire consequences.
-- Steve
On Mon, Mar 16, 2009 at 08:19:33AM +0000, Frederic Weisbecker wrote:
> Commit-ID: 2fc1dfbe17e7705c55b7a99da995fa565e26f151
> Gitweb: http://git.kernel.org/tip/2fc1dfbe17e7705c55b7a99da995fa565e26f151
> Author: Frederic Weisbecker <fweisbec@...il.com>
> AuthorDate: Mon, 16 Mar 2009 01:45:03 +0100
> Commit: Ingo Molnar <mingo@...e.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@...e.hu>
> Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> LKML-Reference: <1237164303-11476-1-git-send-email-fweisbec@...il.com>
> Signed-off-by: Ingo Molnar <mingo@...e.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);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists