Skip to content

Commit c7d5406

Browse files
liu-song-6kernel-patches-bot
authored andcommitted
selftests/bpf: fix compilation error in progs/profiler.inc.h
Fix the following error when compiling selftests/bpf progs/profiler.inc.h:246:5: error: redefinition of 'pids_cgrp_id' as different kind of symbol pids_cgrp_id is used in cgroup code, and included in vmlinux.h. Fix the error by renaming pids_cgrp_id as pids_cgroup_id. Fixes: 03d4d13 ("selftests/bpf: Add profiler test") Signed-off-by: Song Liu <[email protected]> Reported-by: Jiri Olsa <[email protected]> Acked-by: John Fastabend <[email protected]>
1 parent 63101e5 commit c7d5406

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/bpf/progs/profiler.inc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ static ino_t get_inode_from_kernfs(struct kernfs_node* node)
243243
}
244244
}
245245

246-
int pids_cgrp_id = 1;
246+
int pids_cgroup_id = 1;
247247

248248
static INLINE void* populate_cgroup_info(struct cgroup_data_t* cgroup_data,
249249
struct task_struct* task,
@@ -262,7 +262,7 @@ static INLINE void* populate_cgroup_info(struct cgroup_data_t* cgroup_data,
262262
BPF_CORE_READ(task, cgroups, subsys[i]);
263263
if (subsys != NULL) {
264264
int subsys_id = BPF_CORE_READ(subsys, ss, id);
265-
if (subsys_id == pids_cgrp_id) {
265+
if (subsys_id == pids_cgroup_id) {
266266
proc_kernfs = BPF_CORE_READ(subsys, cgroup, kn);
267267
root_kernfs = BPF_CORE_READ(subsys, ss, root, kf_root, kn);
268268
break;

0 commit comments

Comments
 (0)