Messages in this thread | | | Subject | Re: [RFC] Hack to use mkdir/rmdir in debugfs | From | Steven Rostedt <> | Date | Tue, 22 Jan 2013 23:48:32 -0500 |
| |
On Tue, 2013-01-22 at 23:44 -0500, Steven Rostedt wrote:
> + ret = event_trace_add_tracer(tr->dir, tr); > + if (ret) > + goto out_free_tr; > + > + init_tracer_debugfs(tr, tr->dir); > + > + mutex_unlock(&trace_types_lock); > + > + list_add(&tr->list, &ftrace_trace_arrays);
I just noticed this bug :-)
The list_add() needs to be inside the mutex protection. This code use to be within the trace_new_instance_write(), and I just moved it into its own function. Must have been where I screwed up.
-- Steve
> + > + return 0; > + > + out_free_tr: > + if (tr->buffer) > + ring_buffer_free(tr->buffer); > + kfree(tr->name); > + kfree(tr); > + > + out_unlock: > + mutex_unlock(&trace_types_lock); > + > + return ret; > + > +} > +
| |