From: Michael Jeanson Date: Tue, 27 Aug 2024 18:19:03 +0000 (-0400) Subject: Fix: unload all kernel modules on sessiond exit X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f50b6d556820ba724597c9fe760677cfbd1c9ceb;p=lttng-tools.git Fix: unload all kernel modules on sessiond exit Stopping a root lttng-sessiond that has loaded kernel modules currently leaves some modules loaded, add them in the correct order to allow unloading them all. Change-Id: I71f25c798f8c42737d295f32a5e3708287168bc6 Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/modprobe.cpp b/src/bin/lttng-sessiond/modprobe.cpp index e2050e7fe..d14dd7dfc 100644 --- a/src/bin/lttng-sessiond/modprobe.cpp +++ b/src/bin/lttng-sessiond/modprobe.cpp @@ -27,6 +27,26 @@ /* LTTng kernel tracer mandatory core modules list */ struct kern_modules_param kern_modules_control_core[] = { + { + .name = (char *) "lttng-wrapper", + .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED, + .loaded = false, + }, + { + .name = (char *) "lttng-statedump", + .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED, + .loaded = false, + }, + { + .name = (char *) "lttng-clock", + .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED, + .loaded = false, + }, + { + .name = (char *) "lttng-lib-ring-buffer", + .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED, + .loaded = false, + }, { .name = (char *) "lttng-ring-buffer-client-discard", .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED,