[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150126193909.19967bd0@grimm.local.home>
Date: Mon, 26 Jan 2015 19:39:09 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 00/16 v3] tracing: Add new file system tracefs
On Mon, 26 Jan 2015 18:49:16 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:
> On Mon, 26 Jan 2015 18:43:14 -0500
> Steven Rostedt <rostedt@...dmis.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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists