Re: [Qemu-devel] [PATCH 2/2] virtio-net: check that tx packet has positive size

2019-07-22 Thread Stefan Hajnoczi
On Fri, Jul 19, 2019 at 06:52:30PM +, Oleinik, Alexander wrote: > virtio_net_flush_tx does not check that the packet size is nonzero, > which causes q->aysnc_tx.elem to be set. Then, when the device is reset, there > is an assertion failure since q->aysnc_tx.elem must be flushed/cleared. >

[Qemu-devel] [PATCH 2/2] virtio-net: check that tx packet has positive size

2019-07-19 Thread Oleinik, Alexander
virtio_net_flush_tx does not check that the packet size is nonzero, which causes q->aysnc_tx.elem to be set. Then, when the device is reset, there is an assertion failure since q->aysnc_tx.elem must be flushed/cleared. Zero-sized packets are unsupported - check packet size, prior to sending.