projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: leak of UST app hash tables
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
main.c
diff --git
a/src/bin/lttng-sessiond/main.c
b/src/bin/lttng-sessiond/main.c
index a72d44a3eafa1e7cd333ee91626f02f2203e35d0..ee19ef840d339cc6b4a4342b529e1c4f6b375a44 100644
(file)
--- a/
src/bin/lttng-sessiond/main.c
+++ b/
src/bin/lttng-sessiond/main.c
@@
-6226,6
+6226,13
@@
exit_init_data:
rcu_thread_offline();
rcu_unregister_thread();
rcu_thread_offline();
rcu_unregister_thread();
+ /*
+ * Ensure all prior call_rcu are done. call_rcu callbacks may push
+ * hash tables to the ht_cleanup thread. Therefore, we ensure that
+ * the queue is empty before shutting down the clean-up thread.
+ */
+ rcu_barrier();
+
ret = notify_thread_pipe(ht_cleanup_quit_pipe[1]);
if (ret < 0) {
ERR("write error on ht_cleanup quit pipe");
ret = notify_thread_pipe(ht_cleanup_quit_pipe[1]);
if (ret < 0) {
ERR("write error on ht_cleanup quit pipe");
@@
-6255,9
+6262,6
@@
exit_health_sessiond_cleanup:
exit_create_run_as_worker_cleanup:
exit_options:
exit_create_run_as_worker_cleanup:
exit_options:
- /* Ensure all prior call_rcu are done. */
- rcu_barrier();
-
sessiond_cleanup_options();
exit_set_signal_handler:
sessiond_cleanup_options();
exit_set_signal_handler:
This page took
0.024538 seconds
and
4
git commands to generate.