Re: [PATCH v2 1/1] ftrace: do not update max buffer with no users

From: Ingo Molnar
Date: Thu Nov 13 2008 - 03:41:20 EST



* Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> Impact: only use max latency buffer when a user is configured
>
> Pekka reported a bug with the resizing of the buffers when only the
> MMIO tracer was configured. The issue was, to save memory, the max
> latency trace buffer was only initialized if a tracer that uses it
> is configured in.
>
> What happened was that the max latency buffer was never initialized
> when only the MMIO tracer was configurued. The MMIO tracer does not
> use the max tracer, which kept it from being initialized. But the
> resize code still tried to resize the max latency buffers, but
> because they were never allocated, the resize code was passed a NULL
> pointer.
>
> This patch checks if the max tracer is NULL before resizing it. It
> also hides the modification functions of the max tracer behind the
> TRACER_MAX_TRACE config.
>
> Reported-by: Pekka Paalanen <pq@xxxxxx>
> Signed-off-by: Steven Rostedt <srostedt@xxxxxxxxxx>
> ---
> kernel/trace/trace.c | 171 ++++++++++++++++++++++++++------------------------
> 1 files changed, 88 insertions(+), 83 deletions(-)

This is _way_ too much churn for .28, we need a much simpler solution.

Ingo
--
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/