CC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: Hangbin Liu <[email protected]> TO: [email protected] CC: [email protected] CC: "Toke Høiland-Jørgensen" <[email protected]> CC: Jiri Benc <[email protected]> CC: Jesper Dangaard Brouer <[email protected]> CC: Eelco Chaudron <[email protected]> CC: [email protected] CC: Daniel Borkmann <[email protected]> CC: Lorenzo Bianconi <[email protected]> CC: David Ahern <[email protected]>
From: kernel test robot <[email protected]> kernel/bpf/devmap.c:667:9-12: ERROR: iterator variable bound on line 666 cannot be NULL Many iterators have the property that the first argument is always bound to a real list element, never NULL. Semantic patch information: False positives arise for some iterators that do not have this property, or in cases when the loop cursor is reassigned. The latter should only happen when the matched code is on the way to a loop exit (break, goto, or return). Generated by: scripts/coccinelle/iterators/itnull.cocci CC: Hangbin Liu <[email protected]> Reported-by: kernel test robot <[email protected]> Signed-off-by: kernel test robot <[email protected]> --- url: https://github.com/0day-ci/linux/commits/Hangbin-Liu/xdp-extend-xdp_redirect_map-with-broadcast-support/20210413-174252 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master :::::: branch date: 8 hours ago :::::: commit date: 8 hours ago Please take the patch only if it's a positive warning. Thanks! devmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/bpf/devmap.c +++ b/kernel/bpf/devmap.c @@ -664,7 +664,7 @@ int dev_map_redirect_multi(struct net_de for (i = 0; i < dtab->n_buckets; i++) { head = dev_map_index_hash(dtab, i); hlist_for_each_entry_safe(dst, next, head, index_hlist) { - if (!dst || dst->dev->ifindex == exclude_ifindex) + if (dst->dev->ifindex == exclude_ifindex) continue; /* we only need n-1 clones; last_dst enqueued below */ _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
