Re: [PATCH] virtio_net: fix integer overflow in stats

2024-10-16 Thread Jason Wang
On Thu, Oct 17, 2024 at 1:27 AM Michael S. Tsirkin wrote: > > Static analysis on linux-next has detected the following issue > in function virtnet_stats_ctx_init, in drivers/net/virtio_net.c : > > if (vi->device_stats_cap & VIRTIO_NET_STATS_TYPE_CVQ) { > queue_type = VIRTNE

[PATCH] virtio_net: fix integer overflow in stats

2024-10-16 Thread Michael S. Tsirkin
Static analysis on linux-next has detected the following issue in function virtnet_stats_ctx_init, in drivers/net/virtio_net.c : if (vi->device_stats_cap & VIRTIO_NET_STATS_TYPE_CVQ) { queue_type = VIRTNET_Q_TYPE_CQ; ctx->bitmap[queue_type] |= VIRTIO_NET_S