Thread (27 messages) 27 messages, 6 authors, 2021-01-19

[kbuild] Re: [PATCH netdev 5/5] virtio-net, xsk: virtio-net support xsk zero copy tx

From: Dan Carpenter <hidden>
Date: 2021-01-05 13:37:03
Also in: oe-kbuild, oe-kbuild-all

Hi Xuan,

url:    https://github.com/0day-ci/linux/commits/Xuan-Zhuo/virtio-net-support-xdp-socket-zero-copy-xmit/20210105-171505
base:   https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git  master
config: i386-randconfig-m021-20210105 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <redacted>
Reported-by: Dan Carpenter <redacted>

New smatch warnings:
drivers/net/virtio_net.c:2669 virtnet_xsk_timeout() warn: test_bit() takes a bit number
drivers/net/virtio_net.c:2899 virtnet_xsk_run() warn: test_bit() takes a bit number
drivers/net/virtio_net.c:2982 virtnet_xsk_wakeup() warn: test_bit() takes a bit number

Old smatch warnings:
drivers/net/virtio_net.c:2908 virtnet_xsk_run() warn: test_bit() takes a bit number
drivers/net/virtio_net.c:2918 virtnet_xsk_run() warn: test_bit() takes a bit number
drivers/net/virtio_net.c:2951 virtnet_xsk_run() warn: test_bit() takes a bit number
drivers/net/virtio_net.c:3073 virtnet_config_changed_work() error: uninitialized symbol 'v'.

vim +2669 drivers/net/virtio_net.c

265d3cdead3bd6 Xuan Zhuo      2021-01-05  2663  static enum hrtimer_restart virtnet_xsk_timeout(struct hrtimer *timer)
265d3cdead3bd6 Xuan Zhuo      2021-01-05  2664  {
265d3cdead3bd6 Xuan Zhuo      2021-01-05  2665  	struct send_queue *sq;
265d3cdead3bd6 Xuan Zhuo      2021-01-05  2666  
265d3cdead3bd6 Xuan Zhuo      2021-01-05  2667  	sq = container_of(timer, struct send_queue, xsk.timer);
265d3cdead3bd6 Xuan Zhuo      2021-01-05  2668  
265d3cdead3bd6 Xuan Zhuo      2021-01-05 @2669  	clear_bit(VIRTNET_STATE_XSK_TIMER, &sq->xsk.state);

This is a double shift bug like BIT(BIT(foo)).

265d3cdead3bd6 Xuan Zhuo      2021-01-05  2670  
265d3cdead3bd6 Xuan Zhuo      2021-01-05  2671  	virtqueue_napi_schedule(&sq->napi, sq->vq);
265d3cdead3bd6 Xuan Zhuo      2021-01-05  2672  
265d3cdead3bd6 Xuan Zhuo      2021-01-05  2673  	return HRTIMER_NORESTART;
265d3cdead3bd6 Xuan Zhuo      2021-01-05  2674  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org 

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help