Skip to content

Commit

Permalink
markers: marker_synchronize_unregister()
Browse files Browse the repository at this point in the history
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 <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Mathieu Desnoyers authored and Ingo Molnar committed Oct 14, 2008
1 parent 9a1e969 commit e98d0ea
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/linux/marker.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e98d0ea

Please sign in to comment.