Skip to content

Commit

Permalink
tracepoints: samples, fix teardown
Browse files Browse the repository at this point in the history
Impact: fix a bug in sample tracepoints

Need a tracepoint_synchronize_unregister() 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 <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Mathieu Desnoyers authored and Ingo Molnar committed Nov 16, 2008
1 parent a0bca6a commit 2504ea5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions samples/tracepoints/tracepoint-probe-sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ void __exit tp_sample_trace_exit(void)
{
unregister_trace_subsys_eventb(probe_subsys_eventb);
unregister_trace_subsys_event(probe_subsys_event);
tracepoint_synchronize_unregister();
}

module_exit(tp_sample_trace_exit);
Expand Down
1 change: 1 addition & 0 deletions samples/tracepoints/tracepoint-probe-sample2.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module_init(tp_sample_trace_init);
void __exit tp_sample_trace_exit(void)
{
unregister_trace_subsys_event(probe_subsys_event);
tracepoint_synchronize_unregister();
}

module_exit(tp_sample_trace_exit);
Expand Down

0 comments on commit 2504ea5

Please sign in to comment.