From: Mathieu Desnoyers Date: Mon, 29 Sep 2008 15:05:13 +0000 (-0400) Subject: markers: marker_synchronize_unregister() X-Git-Tag: v2.6.28-rc1~78^2~57 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e98d0eabef2748d88fa58760d104e8e68517406b;p=linux-2.6-omap-h63xx.git markers: marker_synchronize_unregister() Create marker_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/marker.h b/include/linux/marker.h index 1290653f924..889196c7fbb 100644 --- a/include/linux/marker.h +++ b/include/linux/marker.h @@ -160,4 +160,11 @@ extern int marker_probe_unregister_private_data(marker_probe_func *probe, extern void *marker_get_private_data(const char *name, marker_probe_func *probe, int num); +/* + * marker_synchronize_unregister must be called between the last marker probe + * unregistration and the end of module exit to make sure there is no caller + * executing a probe when it is freed. + */ +#define marker_synchronize_unregister() synchronize_sched() + #endif