Re: [PATCH 5/5] tracing/events: make modules have their ownfile_operations structure

From: Ingo Molnar
Date: Sun Apr 26 2009 - 07:06:29 EST



* Greg KH <greg@xxxxxxxxx> wrote:

> On Sat, Apr 25, 2009 at 12:20:35AM -0400, Steven Rostedt wrote:
> > From: Steven Rostedt <srostedt@xxxxxxxxxx>
> >
> > For proper module reference counting, the file_operations that modules use
> > must have the "owner" field set to the module. Unfortunately, the trace events
> > use share file_operations. The same file_operations are used by all both
> > kernel core and all modules.
> >
> > This patch makes the modules allocate their own file_operations and
> > copies the functions from the core kernel. This allows those file
> > operations to be owned by the module.
> >
> > Care is taken to free this code on module unload.
> >
> > Thanks to Greg KH for reminding me that file_operations must be owned
> > by the module to have reference counting take place.
> >
> > Cc: Greg KH <greg@xxxxxxxxx>
> > Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
>
> Looks good, feel free to add an:
> Acked-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
> to it.

I've amended the final commit with your ack - thanks guys!

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