Re: [Qemu-devel] [2.2 PATCH V2] virtio-net: fix unmap leak

2014-11-28 Thread Peter Maydell
On 27 November 2014 at 10:04, Jason Wang wrote: > virtio_net_handle_ctrl() and other functions that process control vq > request call iov_discard_front() which will shorten the iov. This will > lead unmapping in virtqueue_push() leaks mapping. > > Fixes this by keeping the original iov untouched a

Re: [Qemu-devel] [2.2 PATCH V2] virtio-net: fix unmap leak

2014-11-27 Thread Michael S. Tsirkin
On Thu, Nov 27, 2014 at 02:09:06PM +, Peter Maydell wrote: > On 27 November 2014 at 12:42, Peter Maydell wrote: > > On 27 November 2014 at 12:33, Michael S. Tsirkin wrote: > >> On Thu, Nov 27, 2014 at 06:04:03PM +0800, Jason Wang wrote: > >>> virtio_net_handle_ctrl() and other functions that

Re: [Qemu-devel] [2.2 PATCH V2] virtio-net: fix unmap leak

2014-11-27 Thread Michael S. Tsirkin
On Thu, Nov 27, 2014 at 02:54:47PM +, Stefano Stabellini wrote: > On Thu, 27 Nov 2014, Peter Maydell wrote: > > On 27 November 2014 at 12:42, Peter Maydell > > wrote: > > > On 27 November 2014 at 12:33, Michael S. Tsirkin wrote: > > >> On Thu, Nov 27, 2014 at 06:04:03PM +0800, Jason Wang wro

Re: [Qemu-devel] [2.2 PATCH V2] virtio-net: fix unmap leak

2014-11-27 Thread Stefano Stabellini
On Thu, 27 Nov 2014, Peter Maydell wrote: > On 27 November 2014 at 12:42, Peter Maydell wrote: > > On 27 November 2014 at 12:33, Michael S. Tsirkin wrote: > >> On Thu, Nov 27, 2014 at 06:04:03PM +0800, Jason Wang wrote: > >>> virtio_net_handle_ctrl() and other functions that process control vq >

Re: [Qemu-devel] [2.2 PATCH V2] virtio-net: fix unmap leak

2014-11-27 Thread Michael S. Tsirkin
On Thu, Nov 27, 2014 at 02:09:06PM +, Peter Maydell wrote: > On 27 November 2014 at 12:42, Peter Maydell wrote: > > On 27 November 2014 at 12:33, Michael S. Tsirkin wrote: > >> On Thu, Nov 27, 2014 at 06:04:03PM +0800, Jason Wang wrote: > >>> virtio_net_handle_ctrl() and other functions that

Re: [Qemu-devel] [2.2 PATCH V2] virtio-net: fix unmap leak

2014-11-27 Thread Peter Maydell
On 27 November 2014 at 12:42, Peter Maydell wrote: > On 27 November 2014 at 12:33, Michael S. Tsirkin wrote: >> On Thu, Nov 27, 2014 at 06:04:03PM +0800, Jason Wang wrote: >>> virtio_net_handle_ctrl() and other functions that process control vq >>> request call iov_discard_front() which will shor

Re: [Qemu-devel] [2.2 PATCH V2] virtio-net: fix unmap leak

2014-11-27 Thread Peter Maydell
On 27 November 2014 at 12:33, Michael S. Tsirkin wrote: > On Thu, Nov 27, 2014 at 06:04:03PM +0800, Jason Wang wrote: >> virtio_net_handle_ctrl() and other functions that process control vq >> request call iov_discard_front() which will shorten the iov. This will >> lead unmapping in virtqueue_pus

Re: [Qemu-devel] [2.2 PATCH V2] virtio-net: fix unmap leak

2014-11-27 Thread Michael S. Tsirkin
On Thu, Nov 27, 2014 at 06:04:03PM +0800, Jason Wang wrote: > virtio_net_handle_ctrl() and other functions that process control vq > request call iov_discard_front() which will shorten the iov. This will > lead unmapping in virtqueue_push() leaks mapping. > > Fixes this by keeping the original iov

Re: [Qemu-devel] [2.2 PATCH V2] virtio-net: fix unmap leak

2014-11-27 Thread Fam Zheng
On Thu, 11/27 18:04, Jason Wang wrote: > virtio_net_handle_ctrl() and other functions that process control vq > request call iov_discard_front() which will shorten the iov. This will > lead unmapping in virtqueue_push() leaks mapping. > > Fixes this by keeping the original iov untouched and using

Re: [Qemu-devel] [2.2 PATCH V2] virtio-net: fix unmap leak

2014-11-27 Thread Stefano Stabellini
On Thu, 27 Nov 2014, Jason Wang wrote: > virtio_net_handle_ctrl() and other functions that process control vq > request call iov_discard_front() which will shorten the iov. This will > lead unmapping in virtqueue_push() leaks mapping. > > Fixes this by keeping the original iov untouched and using