Re: [PATCH v2] tracing: Protect the buffer from recursion in perf

From: Frederic Weisbecker
Date: Tue Nov 10 2009 - 05:40:10 EST


On Tue, Nov 10, 2009 at 11:27:42AM +0100, Peter Zijlstra wrote:
> There already is recursion protection in
> kernel/perf_event.c:perf_swevent_recursion_context() and thereabouts.
> Could you not fix this by widening its scope?


Hmm, indeed.
I could probably use perf_swevent_recursion_context() directly from
the tracing fill path. And then split up a bit do_perf_sw_event()
so that it continues to check the recursion for normal software events
but not for trace events (for which we would already explicitly
call perf_swevent_recursion_context()).

I'll try that, thanks!

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