Re: [PATCH] tracing/profile: Fix profile_disable vs module_unload

From: Steven Rostedt
Date: Wed Aug 26 2009 - 17:21:26 EST



On Wed, 26 Aug 2009, Mathieu Desnoyers wrote:
> * Steven Rostedt (rostedt@xxxxxxxxxxx) wrote:

> > Anyway, this prevents your tracepoints from doing the odd things of
> > loading a probe before it exists. Well you can, but then you prevent the
> > unload of the module that registered it. Fine, I chucked out that patch.
> >
>
> you should try adding the required tracepoint_synchronize_unregister()
> call to ftrace_profile_disable_##call in ftrace.h. I expect this will
> fix your problem.

Just did, and it did not solve the bug.

>
> Note that this is a bit slow to call it at each unregistration. Ideally,
> a module containing tracepoint probes should call this synchronization
> primitive only once at module unload.

The bug looks like it is registering a probe, but not unregistering it
before leaving the module. But when the module is loaded again, it now has
a bad function to call when the tracepoint is hit.

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