Re: [PATCH 0/3] [GIT PULL][3.9] tracing: Fixes with flags andlatency tracers

From: Steven Rostedt
Date: Thu Mar 14 2013 - 23:38:59 EST


On Thu, 2013-03-14 at 17:33 -0400, Steven Rostedt wrote:

> Anyway, here's hopefully my final series of changes for 3.9.
> (Famous last words)

And there's a bug in this patch set. Thanks to Fangguang's auto tests,
it showed a bug in my new work, which points out a bug in this patch
set. The following change is needed to patch 2:

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index eaaccd8..02debab 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2897,7 +2897,9 @@ static void set_tracer_flags(unsigned int mask, int enabled)

if (mask == TRACE_ITER_OVERWRITE) {
ring_buffer_change_overwrite(global_trace.buffer, enabled);
+#ifdef CONFIG_TRACER_MAX_TRACE
ring_buffer_change_overwrite(max_tr.buffer, enabled);
+#endif
}

if (mask == TRACE_ITER_PRINTK)


But this bug is worse than the one in my new code. As the new code wont
compile here, this code will, but "max_tr.buffer" will be NULL if
CONFIG_MAX_TRACER_MAX_TRACE is not defined and will cause a NULL pointer
dereference.

I'll update the patch series, test it and push it out again.

Thanks!

-- Steve


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