sessiond: document RCU locking assumption during channel metadata statedump
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 30 Mar 2022 13:23:46 +0000 (09:23 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 30 Mar 2022 13:23:46 +0000 (09:23 -0400)
The rcu read lock must be held by the caller during a call to
ust_metadata_channel_statedump. An assertion and a comment are added.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ia57a140d51470cc43cf62d36c9b4b552e1c17191

src/bin/lttng-sessiond/ust-metadata.cpp

index 566799efd08b2016e7ce24edeeadb3cd70937d04..5f031a9c41f7f074fda80129828b0c6688508576 100644 (file)
@@ -906,12 +906,16 @@ end:
 
 /*
  * Should be called with session registry mutex held.
+ *
+ * RCU read lock must be held by the caller.
  */
 int ust_metadata_channel_statedump(struct ust_registry_session *session,
                struct ust_registry_channel *chan)
 {
        int ret;
 
+       ASSERT_RCU_READ_LOCKED();
+
        /* Don't dump metadata events */
        if (chan->chan_id == -1U)
                return 0;
This page took 0.027751 seconds and 5 git commands to generate.