Re: Fwd: [draft] Tracing multibuffer support concurrency issues

2013-07-01 Thread Alexander Lam
On Mon, Jul 1, 2013 at 6:35 PM, Steven Rostedt wrote: > On Mon, 2013-07-01 at 15:33 -0700, Alexander Lam wrote: > >> To fix this we could go through the ftrace_trace_arrays list and use >> addresses to check if a particular pointer to a trace_array is still >> valid, but this is vulnerable to the

Re: Fwd: [draft] Tracing multibuffer support concurrency issues

2013-07-01 Thread Steven Rostedt
On Mon, 2013-07-01 at 21:35 -0400, Steven Rostedt wrote: > > > > Is there a better way to fix this problem? > > > > Also unaddressed are all of the other files which use a trace_array, > > trace_cpu, or ftrace_event_file in their operation - these would need > > the same fix. > > Hmm, really? J

Re: Fwd: [draft] Tracing multibuffer support concurrency issues

2013-07-01 Thread Steven Rostedt
On Mon, 2013-07-01 at 15:33 -0700, Alexander Lam wrote: > To fix this we could go through the ftrace_trace_arrays list and use > addresses to check if a particular pointer to a trace_array is still > valid, but this is vulnerable to the ABA problem if a trace_array is > freed and another is reallo

Fwd: [draft] Tracing multibuffer support concurrency issues

2013-07-01 Thread Alexander Lam
Hi all, I noticed that a695cb58 "tracing: Prevent deleting instances when they are being read" [1] still leaves open the possibility of the trace_array being deleted before the reference counter is incremented. Thread A creates a new instance "foo", then tries to open "foo/trace" for writing, whi