From: Mathieu Desnoyers Date: Mon, 6 Oct 2008 14:33:00 +0000 (-0400) Subject: tracepoints: tracepoint_synchronize_unregister() X-Git-Tag: v2.6.28-rc1~78^2~6 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f2461fc82a083dd60062e05e704c5fcc1c658ba1;p=linux-2.6-omap-h63xx.git tracepoints: tracepoint_synchronize_unregister() Create tracepoint_synchronize_unregister() which must be called before the end of exit() to make sure every probe callers have exited the non preemptible section and thus are not executing the probe code anymore. Signed-off-by: Mathieu Desnoyers Signed-off-by: Ingo Molnar --- diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index e623a6fca5c..199f4c207c1 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h @@ -124,4 +124,11 @@ extern void tracepoint_iter_reset(struct tracepoint_iter *iter); extern int tracepoint_get_iter_range(struct tracepoint **tracepoint, struct tracepoint *begin, struct tracepoint *end); +/* + * tracepoint_synchronize_unregister must be called between the last tracepoint + * probe unregistration and the end of module exit to make sure there is no + * caller executing a probe when it is freed. + */ +#define tracepoint_synchronize_unregister() synchronize_sched() + #endif