On Mon, 26 Jan 2015 18:49:16 -0500 Steven Rostedt <rost...@goodmis.org> wrote:
> On Mon, 26 Jan 2015 18:43:14 -0500 > Steven Rostedt <rost...@goodmis.org> wrote: > > > That is, we can not hold i_mutex and take trace_types_lock. > > > > trace_types_lock needs to be held with the creation or destruction > > of events, which is what mkdir an rmdir do. > > Although, I can not remember how this happened, but lockdep blew up on > me with this. I'll look again. OK, found it. When events are created (module is loaded), the trace_types_lock is taken, and the event directories are created (these are in /sys/kernel/debug/tracing/events). We need to grab the i_mutex in order to create these files. This means that we can not take the trace_types_lock within the mkdir or rmdir calls. The directories are not static even outside the mkdir and rmdir calls. As events can be created from several sources, which will create new files and directories. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/