]> git.ipfire.org Git - pakfire.git/commitdiff
cgroup: Make the BPF log buffer statically allocated again
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 6 Oct 2023 15:17:25 +0000 (15:17 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 6 Oct 2023 15:17:25 +0000 (15:17 +0000)
This might potentially make this non-thread-safe, but without
loading the BPF program crashes immediately.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/cgroup.c

index d40b68fed8ceec9b34b4421cc7a4a93782ce57a9..3559559a1b070fe8a029d500292ca9943a596c2a 100644 (file)
@@ -214,7 +214,7 @@ static void pakfire_cgroup_free(struct pakfire_cgroup* cgroup) {
 }
 
 static int pakfire_cgroup_setup_devices(struct pakfire_cgroup* cgroup) {
-       char bpf_log_buffer[BPF_LOG_BUF_SIZE];
+       static char bpf_log_buffer[BPF_LOG_BUF_SIZE];
 
        LIBBPF_OPTS(bpf_prog_load_opts, opts,
                // Log Buffer