Re: [PATCH] virtio-net: fix map leaking on error during receive

2022-03-07 Thread Jason Wang
On Tue, Mar 8, 2022 at 2:56 PM Michael S. Tsirkin wrote: > > On Tue, Mar 08, 2022 at 01:56:42PM +0800, Jason Wang wrote: > > Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg") > > tries to fix the use after free of the sg by caching the virtqueue > > elements in an array and unma

Re: [PATCH] virtio-net: fix map leaking on error during receive

2022-03-07 Thread Michael S. Tsirkin
On Tue, Mar 08, 2022 at 01:56:42PM +0800, Jason Wang wrote: > Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg") > tries to fix the use after free of the sg by caching the virtqueue > elements in an array and unmap them at once after receiving the > packets, But it forgot to unmap

[PATCH] virtio-net: fix map leaking on error during receive

2022-03-07 Thread Jason Wang
Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg") tries to fix the use after free of the sg by caching the virtqueue elements in an array and unmap them at once after receiving the packets, But it forgot to unmap the cached elements on error which will lead to leaking of mapping