* [sashal-stable:pending-4.4 15/20] net/ipv4/ping.c:227:30: error: implicit declaration of function 'inet_sdif'; did you mean 'inet_iif'?
@ 2022-01-30 5:33 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-01-30 5:33 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 11449 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git pending-4.4
head: d208df794d9702209bd1fa10f31f8dc57e409759
commit: 624c27d570e061e6ce9815d7979fa7ce91af1dab [15/20] ping: fix the sk_bound_dev_if match in ping_lookup
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20220130/202201301225.YlnCSJGH-lkp(a)intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/commit/?id=624c27d570e061e6ce9815d7979fa7ce91af1dab
git remote add sashal-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-stable pending-4.4
git checkout 624c27d570e061e6ce9815d7979fa7ce91af1dab
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash net/ipv4/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
^
include/linux/netdevice.h:3031:2: note: in expansion of macro 'BUG_ON'
BUG_ON(index >= dev->num_rx_queues);
^~~~~~
In file included from net/ipv4/ping.c:33:0:
include/linux/netdevice.h: In function 'netif_msg_init':
include/linux/netdevice.h:3305:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
^~
In file included from include/net/rtnetlink.h:5:0,
from include/net/sch_generic.h:12,
from include/linux/filter.h:16,
from include/net/sock.h:62,
from include/net/inet_sock.h:27,
from include/net/ip.h:30,
from net/ipv4/ping.c:35:
include/net/netlink.h: In function 'nlmsg_ok':
include/net/netlink.h:337:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
nlh->nlmsg_len <= remaining);
^~
include/net/netlink.h: In function 'nlmsg_parse':
include/net/netlink.h:372:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
^
include/net/netlink.h: In function 'nlmsg_validate':
include/net/netlink.h:405:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
^
In file included from include/net/sch_generic.h:12:0,
from include/linux/filter.h:16,
from include/net/sock.h:62,
from include/net/inet_sock.h:27,
from include/net/ip.h:30,
from net/ipv4/ping.c:35:
include/net/rtnetlink.h: In function 'rtnl_msg_family':
include/net/rtnetlink.h:20:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg))
^~
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/uapi/linux/capability.h:16,
from include/linux/capability.h:15,
from include/linux/sched.h:15,
from include/linux/uaccess.h:4,
from net/ipv4/ping.c:23:
include/net/sch_generic.h: In function 'qdisc_cb_private_validate':
include/net/sch_generic.h:267:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
BUILD_BUG_ON(sizeof(qcb->data) < sz);
^
include/linux/compiler.h:493:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:513:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~~~~~~~~~~~
include/linux/bug.h:50:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/bug.h:74:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
include/net/sch_generic.h:267:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(qcb->data) < sz);
^~~~~~~~~~~~
In file included from include/net/sock.h:62:0,
from include/net/inet_sock.h:27,
from include/net/ip.h:30,
from net/ipv4/ping.c:35:
include/linux/filter.h: In function 'bpf_needs_clear_a':
include/linux/filter.h:517:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (first->k == SKF_AD_OFF + SKF_AD_ALU_XOR_X)
^~
In file included from include/net/inet_sock.h:27:0,
from include/net/ip.h:30,
from net/ipv4/ping.c:35:
include/net/sock.h: In function 'skb_do_copy_data_nocache':
include/net/sock.h:1841:54: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (csum_and_copy_from_iter(to, copy, &csum, from) != copy)
^~
include/net/sock.h:1845:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (copy_from_iter_nocache(to, copy, from) != copy)
^~
include/net/sock.h:1847:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
} else if (copy_from_iter(to, copy, from) != copy)
^~
In file included from include/linux/tcp.h:23:0,
from include/linux/ipv6.h:72,
from include/net/ipv6.h:16,
from include/net/inetpeer.h:15,
from include/net/route.h:28,
from include/net/ip.h:31,
from net/ipv4/ping.c:35:
include/net/inet_connection_sock.h: In function 'inet_csk_reqsk_queue_is_full':
include/net/inet_connection_sock.h:294:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
return inet_csk_reqsk_queue_len(sk) >= sk->sk_max_ack_backlog;
^~
net/ipv4/ping.c: In function 'ping_lookup':
>> net/ipv4/ping.c:227:30: error: implicit declaration of function 'inet_sdif'; did you mean 'inet_iif'? [-Werror=implicit-function-declaration]
sk->sk_bound_dev_if != inet_sdif(skb))
^~~~~~~~~
inet_iif
net/ipv4/ping.c: In function 'ping_check_bind_addr':
net/ipv4/ping.c:311:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (addr_len < sizeof(*addr))
^
net/ipv4/ping.c: In function 'ping_getfrag':
net/ipv4/ping.c:619:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
&pfh->msg->msg_iter) != fraglen)
^~
net/ipv4/ping.c:621:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
} else if (offset < sizeof(struct icmphdr)) {
^
net/ipv4/ping.c:625:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
&pfh->msg->msg_iter) != fraglen)
^~
net/ipv4/ping.c: In function 'ping_v4_sendmsg':
net/ipv4/ping.c:733:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (msg->msg_namelen < sizeof(*usin))
^
net/ipv4/ping.c: In function 'ping_recvmsg':
net/ipv4/ping.c:891:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (copied > len) {
^
At top level:
net/ipv4/ping.c:1157:36: warning: 'ping_v4_seq_ops' defined but not used [-Wunused-const-variable=]
static const struct seq_operations ping_v4_seq_ops = {
^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +227 net/ipv4/ping.c
171
172 static struct sock *ping_lookup(struct net *net, struct sk_buff *skb, u16 ident)
173 {
174 struct hlist_nulls_head *hslot = ping_hashslot(&ping_table, net, ident);
175 struct sock *sk = NULL;
176 struct inet_sock *isk;
177 struct hlist_nulls_node *hnode;
178 int dif = skb->dev->ifindex;
179
180 if (skb->protocol == htons(ETH_P_IP)) {
181 pr_debug("try to find: num = %d, daddr = %pI4, dif = %d\n",
182 (int)ident, &ip_hdr(skb)->daddr, dif);
183 #if IS_ENABLED(CONFIG_IPV6)
184 } else if (skb->protocol == htons(ETH_P_IPV6)) {
185 pr_debug("try to find: num = %d, daddr = %pI6c, dif = %d\n",
186 (int)ident, &ipv6_hdr(skb)->daddr, dif);
187 #endif
188 }
189
190 read_lock_bh(&ping_table.lock);
191
192 ping_portaddr_for_each_entry(sk, hnode, hslot) {
193 isk = inet_sk(sk);
194
195 pr_debug("iterate\n");
196 if (isk->inet_num != ident)
197 continue;
198
199 if (skb->protocol == htons(ETH_P_IP) &&
200 sk->sk_family == AF_INET) {
201 pr_debug("found: %p: num=%d, daddr=%pI4, dif=%d\n", sk,
202 (int) isk->inet_num, &isk->inet_rcv_saddr,
203 sk->sk_bound_dev_if);
204
205 if (isk->inet_rcv_saddr &&
206 isk->inet_rcv_saddr != ip_hdr(skb)->daddr)
207 continue;
208 #if IS_ENABLED(CONFIG_IPV6)
209 } else if (skb->protocol == htons(ETH_P_IPV6) &&
210 sk->sk_family == AF_INET6) {
211
212 pr_debug("found: %p: num=%d, daddr=%pI6c, dif=%d\n", sk,
213 (int) isk->inet_num,
214 &sk->sk_v6_rcv_saddr,
215 sk->sk_bound_dev_if);
216
217 if (!ipv6_addr_any(&sk->sk_v6_rcv_saddr) &&
218 !ipv6_addr_equal(&sk->sk_v6_rcv_saddr,
219 &ipv6_hdr(skb)->daddr))
220 continue;
221 #endif
222 } else {
223 continue;
224 }
225
226 if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != dif &&
> 227 sk->sk_bound_dev_if != inet_sdif(skb))
228 continue;
229
230 sock_hold(sk);
231 goto exit;
232 }
233
234 sk = NULL;
235 exit:
236 read_unlock_bh(&ping_table.lock);
237
238 return sk;
239 }
240
---
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:[~2022-01-30 5:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-30 5:33 [sashal-stable:pending-4.4 15/20] net/ipv4/ping.c:227:30: error: implicit declaration of function 'inet_sdif'; did you mean 'inet_iif'? kernel 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.