diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-13 17:16:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-13 17:16:02 +0000 |
commit | 396c327fe40b1db11fc204d7ae7ace84503de681 (patch) | |
tree | 6718eb5d5dcf3c6e3c93e32ac6ac9a857f6ca56e /collectors/cgroups.plugin | |
parent | Releasing debian version 1.38.0-1. (diff) | |
download | netdata-396c327fe40b1db11fc204d7ae7ace84503de681.tar.xz netdata-396c327fe40b1db11fc204d7ae7ace84503de681.zip |
Merging upstream version 1.38.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/cgroups.plugin')
-rw-r--r-- | collectors/cgroups.plugin/sys_fs_cgroup.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/collectors/cgroups.plugin/sys_fs_cgroup.c b/collectors/cgroups.plugin/sys_fs_cgroup.c index 66db0b72..e63e042d 100644 --- a/collectors/cgroups.plugin/sys_fs_cgroup.c +++ b/collectors/cgroups.plugin/sys_fs_cgroup.c @@ -589,7 +589,8 @@ void netdata_cgroup_ebpf_initialize_shm() PROT_READ | PROT_WRITE, MAP_SHARED, shm_fd_cgroup_ebpf, 0); - if (!shm_cgroup_ebpf.header) { + if (unlikely(MAP_FAILED == shm_cgroup_ebpf.header)) { + shm_cgroup_ebpf.header = NULL; collector_error("Cannot map shared memory used between cgroup and eBPF, integration won't happen"); goto end_init_shm; } @@ -606,6 +607,7 @@ void netdata_cgroup_ebpf_initialize_shm() collector_error("Cannot create semaphore, integration between eBPF and cgroup won't happen"); munmap(shm_cgroup_ebpf.header, length); + shm_cgroup_ebpf.header = NULL; end_init_shm: close(shm_fd_cgroup_ebpf); |