Fix missing session locks
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index 8e794bdf4365be1779c2f0bb94c5e99dae5b03ee..6c4b8ec5ce4c94a26b14c33f44839938f8bdd7ac 100644 (file)
@@ -769,12 +769,18 @@ static void update_ust_app(int app_sock)
 {
        struct ltt_session *sess, *stmp;
 
+       session_lock_list();
+
        /* For all tracing session(s) */
        cds_list_for_each_entry_safe(sess, stmp, &session_list_ptr->head, list) {
+               session_lock(sess);
                if (sess->ust_session) {
                        ust_app_global_update(sess->ust_session, app_sock);
                }
+               session_unlock(sess);
        }
+
+       session_unlock_list();
 }
 
 /*
This page took 0.025085 seconds and 5 git commands to generate.