Fix CID 339027 and reverse arguments (#11578)
thiagoftsm committed
Sep 28, 2021 at 11:34 UTC
16cef702482ffa33c2e828a7132c992f2ba52a55
3 files changed
+3
-2
collectors/cgroups.plugin/sys_fs_cgroup.c
+1
-1
@@ -501,7 +501,7 @@ void netdata_cgroup_ebpf_initialize_shm()
501
error("Cannot map shared memory used between cgroup and eBPF, integration won't happen");
502
goto end_init_shm;
503
}
504
- shm_cgroup_ebpf.body = (netdata_ebpf_cgroup_shm_body_t *) (shm_cgroup_ebpf.header +
504
+ shm_cgroup_ebpf.body = (netdata_ebpf_cgroup_shm_body_t *) ((char *)shm_cgroup_ebpf.header +
505
sizeof(netdata_ebpf_cgroup_shm_header_t));
506
507
shm_mutex_cgroup_ebpf = sem_open(NETDATA_NAMED_SEMAPHORE_EBPF_CGROUP_NAME, O_CREAT,
collectors/cgroups.plugin/sys_fs_cgroup.h
+1
@@ -28,6 +28,7 @@ typedef struct netdata_ebpf_cgroup_shm_header {
28
int cgroup_root_count;
29
int cgroup_max;
30
int systemd_enabled;
31
+ int __pad;
32
size_t body_length;
33
} netdata_ebpf_cgroup_shm_header_t;
34
collectors/ebpf.plugin/ebpf_disk.c
+1
-1
@@ -608,7 +608,7 @@ void *ebpf_disk_read_hash(void *ptr)
608
static void ebpf_obsolete_hd_charts(netdata_ebpf_disks_t *w)
609
{
610
ebpf_write_chart_obsolete(w->histogram.name, w->family, w->histogram.title, EBPF_COMMON_DIMENSION_CALL,
611
- w->family, "disk.latency_io", NETDATA_EBPF_CHART_TYPE_STACKED,
611
+ w->family, NETDATA_EBPF_CHART_TYPE_STACKED, "disk.latency_io",
612
w->histogram.order);
613
614
w->flags = 0;