tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.net-ioctl head: 7f733d3e90de599fe50f426d47468fd4cfee4c74 commit: cc772a65d8e903c92559e41cf7c77afdc7045b2c [3/5] ip_rt_ioctl(): take copyin to caller config: x86_64-randconfig-x018-201728 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: git checkout cc772a65d8e903c92559e41cf7c77afdc7045b2c # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): In file included from include/linux/socket.h:6:0, from include/uapi/linux/in.h:23, from include/linux/in.h:23, from net/ipv4/ipconfig.c:39: net/ipv4/ipconfig.c: In function 'ic_setup_if': include/uapi/linux/sockios.h:41:21: warning: passing argument 1 of 'devinet_ioctl' makes pointer from integer without a cast [-Wint-conversion] #define SIOCSIFADDR 0x8916 /* set PA address */ ^ net/ipv4/ipconfig.c:355:27: note: in expansion of macro 'SIOCSIFADDR' if ((err = devinet_ioctl(SIOCSIFADDR, &ir)) < 0) { ^~~~~~~~~~~ In file included from net/ipv4/ipconfig.c:42:0: include/linux/inetdevice.h:166:5: note: expected 'struct net *' but argument is of type 'int' int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *); ^~~~~~~~~~~~~ net/ipv4/ipconfig.c:355:40: warning: passing argument 2 of 'devinet_ioctl' makes integer from pointer without a cast [-Wint-conversion] if ((err = devinet_ioctl(SIOCSIFADDR, &ir)) < 0) { ^ In file included from net/ipv4/ipconfig.c:42:0: include/linux/inetdevice.h:166:5: note: expected 'unsigned int' but argument is of type 'struct ifreq *' int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *); ^~~~~~~~~~~~~ net/ipv4/ipconfig.c:355:13: error: too few arguments to function 'devinet_ioctl' if ((err = devinet_ioctl(SIOCSIFADDR, &ir)) < 0) { ^~~~~~~~~~~~~ In file included from net/ipv4/ipconfig.c:42:0: include/linux/inetdevice.h:166:5: note: declared here int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *); ^~~~~~~~~~~~~ In file included from include/linux/socket.h:6:0, from include/uapi/linux/in.h:23, from include/linux/in.h:23, from net/ipv4/ipconfig.c:39: include/uapi/linux/sockios.h:47:24: warning: passing argument 1 of 'devinet_ioctl' makes pointer from integer without a cast [-Wint-conversion] #define SIOCSIFNETMASK 0x891c /* set network PA mask */ ^ net/ipv4/ipconfig.c:361:27: note: in expansion of macro 'SIOCSIFNETMASK' if ((err = devinet_ioctl(SIOCSIFNETMASK, &ir)) < 0) { ^~~~~~~~~~~~~~ In file included from net/ipv4/ipconfig.c:42:0: include/linux/inetdevice.h:166:5: note: expected 'struct net *' but argument is of type 'int' int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *); ^~~~~~~~~~~~~ net/ipv4/ipconfig.c:361:43: warning: passing argument 2 of 'devinet_ioctl' makes integer from pointer without a cast [-Wint-conversion] if ((err = devinet_ioctl(SIOCSIFNETMASK, &ir)) < 0) { ^ In file included from net/ipv4/ipconfig.c:42:0: include/linux/inetdevice.h:166:5: note: expected 'unsigned int' but argument is of type 'struct ifreq *' int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *); ^~~~~~~~~~~~~ net/ipv4/ipconfig.c:361:13: error: too few arguments to function 'devinet_ioctl' if ((err = devinet_ioctl(SIOCSIFNETMASK, &ir)) < 0) { ^~~~~~~~~~~~~ In file included from net/ipv4/ipconfig.c:42:0: include/linux/inetdevice.h:166:5: note: declared here int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *); ^~~~~~~~~~~~~ In file included from include/linux/socket.h:6:0, from include/uapi/linux/in.h:23, from include/linux/in.h:23, from net/ipv4/ipconfig.c:39: include/uapi/linux/sockios.h:45:24: warning: passing argument 1 of 'devinet_ioctl' makes pointer from integer without a cast [-Wint-conversion] #define SIOCSIFBRDADDR 0x891a /* set broadcast PA address */ ^ net/ipv4/ipconfig.c:367:27: note: in expansion of macro 'SIOCSIFBRDADDR' if ((err = devinet_ioctl(SIOCSIFBRDADDR, &ir)) < 0) { ^~~~~~~~~~~~~~ In file included from net/ipv4/ipconfig.c:42:0: include/linux/inetdevice.h:166:5: note: expected 'struct net *' but argument is of type 'int' int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *); ^~~~~~~~~~~~~ net/ipv4/ipconfig.c:367:43: warning: passing argument 2 of 'devinet_ioctl' makes integer from pointer without a cast [-Wint-conversion] if ((err = devinet_ioctl(SIOCSIFBRDADDR, &ir)) < 0) { ^ In file included from net/ipv4/ipconfig.c:42:0: include/linux/inetdevice.h:166:5: note: expected 'unsigned int' but argument is of type 'struct ifreq *' int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *); ^~~~~~~~~~~~~ net/ipv4/ipconfig.c:367:13: error: too few arguments to function 'devinet_ioctl' if ((err = devinet_ioctl(SIOCSIFBRDADDR, &ir)) < 0) { ^~~~~~~~~~~~~ In file included from net/ipv4/ipconfig.c:42:0: include/linux/inetdevice.h:166:5: note: declared here int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *); ^~~~~~~~~~~~~ net/ipv4/ipconfig.c: In function 'ic_setup_routes': >> net/ipv4/ipconfig.c:403:14: error: implicit declaration of function 'ip_rp_ioctl' [-Werror=implicit-function-declaration] if ((err = ip_rp_ioctl(SIOCADDRT, &rm)) < 0) { ^~~~~~~~~~~ cc1: some warnings being treated as errors vim +/ip_rp_ioctl +403 net/ipv4/ipconfig.c 361 if ((err = devinet_ioctl(SIOCSIFNETMASK, &ir)) < 0) { 362 pr_err("IP-Config: Unable to set interface netmask (%d)\n", 363 err); 364 return -1; 365 } 366 set_sockaddr(sin, ic_myaddr | ~ic_netmask, 0); > 367 if ((err = devinet_ioctl(SIOCSIFBRDADDR, &ir)) < 0) { 368 pr_err("IP-Config: Unable to set interface broadcast address (%d)\n", 369 err); 370 return -1; 371 } 372 /* Handle the case where we need non-standard MTU on the boot link (a network 373 * using jumbo frames, for instance). If we can't set the mtu, don't error 374 * out, we'll try to muddle along. 375 */ 376 if (ic_dev_mtu != 0) { 377 strcpy(ir.ifr_name, ic_dev->dev->name); 378 ir.ifr_mtu = ic_dev_mtu; 379 if ((err = ic_dev_ioctl(SIOCSIFMTU, &ir)) < 0) 380 pr_err("IP-Config: Unable to set interface mtu to %d (%d)\n", 381 ic_dev_mtu, err); 382 } 383 return 0; 384 } 385 386 static int __init ic_setup_routes(void) 387 { 388 /* No need to setup device routes, only the default route... */ 389 390 if (ic_gateway != NONE) { 391 struct rtentry rm; 392 int err; 393 394 memset(&rm, 0, sizeof(rm)); 395 if ((ic_gateway ^ ic_myaddr) & ic_netmask) { 396 pr_err("IP-Config: Gateway not on directly connected network\n"); 397 return -1; 398 } 399 set_sockaddr((struct sockaddr_in *) &rm.rt_dst, 0, 0); 400 set_sockaddr((struct sockaddr_in *) &rm.rt_genmask, 0, 0); 401 set_sockaddr((struct sockaddr_in *) &rm.rt_gateway, ic_gateway, 0); 402 rm.rt_flags = RTF_UP | RTF_GATEWAY; > 403 if ((err = ip_rp_ioctl(SIOCADDRT, &rm)) < 0) { 404 pr_err("IP-Config: Cannot add default route (%d)\n", 405 err); 406 return -1; --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip