* [bpf-next:master 801/821] kernel/bpf/bpf_iter.c:148:15-20: ERROR: invalid reference to the index variable of the iterator on line 133
@ 2020-05-10 4:01 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-05-10 4:01 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3410 bytes --]
CC: kbuild-all(a)lists.01.org
TO: Yonghong Song <yhs@fb.com>
CC: Alexei Starovoitov <ast@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
head: b4563facdcae55c83039d5efcc3b45a63da14d2f
commit: de4e05cac46d206f9090051ef09930514bff73e4 [801/821] bpf: Support bpf tracing/iter programs for BPF_LINK_CREATE
:::::: branch date: 3 hours ago
:::::: commit date: 4 hours ago
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
coccinelle warnings: (new ones prefixed by >>)
>> kernel/bpf/bpf_iter.c:148:15-20: ERROR: invalid reference to the index variable of the iterator on line 133
# https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=de4e05cac46d206f9090051ef09930514bff73e4
git remote add bpf-next https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git
git remote update bpf-next
git checkout de4e05cac46d206f9090051ef09930514bff73e4
vim +148 kernel/bpf/bpf_iter.c
de4e05cac46d20 Yonghong Song 2020-05-09 118
de4e05cac46d20 Yonghong Song 2020-05-09 119 int bpf_iter_link_attach(const union bpf_attr *attr, struct bpf_prog *prog)
de4e05cac46d20 Yonghong Song 2020-05-09 120 {
de4e05cac46d20 Yonghong Song 2020-05-09 121 struct bpf_link_primer link_primer;
de4e05cac46d20 Yonghong Song 2020-05-09 122 struct bpf_iter_target_info *tinfo;
de4e05cac46d20 Yonghong Song 2020-05-09 123 struct bpf_iter_link *link;
de4e05cac46d20 Yonghong Song 2020-05-09 124 bool existed = false;
de4e05cac46d20 Yonghong Song 2020-05-09 125 u32 prog_btf_id;
de4e05cac46d20 Yonghong Song 2020-05-09 126 int err;
de4e05cac46d20 Yonghong Song 2020-05-09 127
de4e05cac46d20 Yonghong Song 2020-05-09 128 if (attr->link_create.target_fd || attr->link_create.flags)
de4e05cac46d20 Yonghong Song 2020-05-09 129 return -EINVAL;
de4e05cac46d20 Yonghong Song 2020-05-09 130
de4e05cac46d20 Yonghong Song 2020-05-09 131 prog_btf_id = prog->aux->attach_btf_id;
de4e05cac46d20 Yonghong Song 2020-05-09 132 mutex_lock(&targets_mutex);
de4e05cac46d20 Yonghong Song 2020-05-09 @133 list_for_each_entry(tinfo, &targets, list) {
de4e05cac46d20 Yonghong Song 2020-05-09 134 if (tinfo->btf_id == prog_btf_id) {
de4e05cac46d20 Yonghong Song 2020-05-09 135 existed = true;
de4e05cac46d20 Yonghong Song 2020-05-09 136 break;
de4e05cac46d20 Yonghong Song 2020-05-09 137 }
de4e05cac46d20 Yonghong Song 2020-05-09 138 }
de4e05cac46d20 Yonghong Song 2020-05-09 139 mutex_unlock(&targets_mutex);
de4e05cac46d20 Yonghong Song 2020-05-09 140 if (!existed)
de4e05cac46d20 Yonghong Song 2020-05-09 141 return -ENOENT;
de4e05cac46d20 Yonghong Song 2020-05-09 142
de4e05cac46d20 Yonghong Song 2020-05-09 143 link = kzalloc(sizeof(*link), GFP_USER | __GFP_NOWARN);
de4e05cac46d20 Yonghong Song 2020-05-09 144 if (!link)
de4e05cac46d20 Yonghong Song 2020-05-09 145 return -ENOMEM;
de4e05cac46d20 Yonghong Song 2020-05-09 146
de4e05cac46d20 Yonghong Song 2020-05-09 147 bpf_link_init(&link->link, BPF_LINK_TYPE_ITER, &bpf_iter_link_lops, prog);
de4e05cac46d20 Yonghong Song 2020-05-09 @148 link->tinfo = tinfo;
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-10 4:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-10 4:01 [bpf-next:master 801/821] kernel/bpf/bpf_iter.c:148:15-20: ERROR: invalid reference to the index variable of the iterator on line 133 kbuild test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.