tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: f9e06c45cb28beb30a6a474952ead7da2b8940f3 commit: f9e06c45cb28beb30a6a474952ead7da2b8940f3 [114/114] tuntap: free XDP dropped packets in a batch config: x86_64-allmodconfig (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: git checkout f9e06c45cb28beb30a6a474952ead7da2b8940f3 # save the attached .config to linux build tree make ARCH=x86_64
All warnings (new ones prefixed by >>):
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
>> drivers/net/tun.c:2503:42: warning: Using plain integer as NULL pointer
drivers/net/tun.c:2989:36: warning: incorrect type in argument 2 (different
address spaces)
drivers/net/tun.c:2989:36: expected struct tun_prog [noderef]
<asn:4>**prog_p
drivers/net/tun.c:2989:36: got struct tun_prog **prog_p
drivers/net/tun.c:3281:42: warning: incorrect type in argument 2 (different
address spaces)
drivers/net/tun.c:3281:42: expected struct tun_prog **prog_p
drivers/net/tun.c:3281:42: got struct tun_prog [noderef]
<asn:4>**<noident>
drivers/net/tun.c:3285:42: warning: incorrect type in argument 2 (different
address spaces)
drivers/net/tun.c:3285:42: expected struct tun_prog **prog_p
drivers/net/tun.c:3285:42: got struct tun_prog [noderef]
<asn:4>**<noident>
drivers/net/tun.c:3378:9: error: incompatible types in comparison expression
(different address spaces)
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
vim +2503 drivers/net/tun.c
2490
2491 static int tun_sendmsg(struct socket *sock, struct msghdr *m, size_t
total_len)
2492 {
2493 int ret, i;
2494 struct tun_file *tfile = container_of(sock, struct tun_file,
socket);
2495 struct tun_struct *tun = tun_get(tfile);
2496 struct tun_msg_ctl *ctl = m->msg_control;
2497 struct xdp_buff *xdp;
2498
2499 if (!tun)
2500 return -EBADFD;
2501
2502 if (ctl && (ctl->type == TUN_MSG_PTR)) {
> 2503 struct tun_page tpage = {0};
2504 int n = ctl->num;
2505 int flush = 0;
2506
2507 local_bh_disable();
2508 rcu_read_lock();
2509
2510 for (i = 0; i < n; i++) {
2511 xdp = &((struct xdp_buff *)ctl->ptr)[i];
2512 tun_xdp_one(tun, tfile, xdp, &flush, &tpage);
2513 }
2514
2515 if (flush)
2516 xdp_do_flush_map();
2517
2518 rcu_read_unlock();
2519 local_bh_enable();
2520
2521 tun_put_page(&tpage);
2522
2523 ret = total_len;
2524 goto out;
2525 }
2526
2527 ret = tun_get_user(tun, tfile, ctl ? ctl->ptr : NULL,
&m->msg_iter,
2528 m->msg_flags & MSG_DONTWAIT,
2529 m->msg_flags & MSG_MORE);
2530 out:
2531 tun_put(tun);
2532 return ret;
2533 }
2534
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip
