diff options
author | Xuan Zhuo <xuanzhuo@linux.alibaba.com> | 2023-12-26 17:43:33 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-12-27 16:10:37 -0500 |
commit | d2c4f1928a3f7f4a1f28a0cfc022e8a145ce6903 (patch) | |
tree | 83590580c3a257ab6d9f78c55bc75654549fe719 /drivers/virtio | |
parent | ab78ffe1ff7d17102972348bb9b1a16ec2696a2b (diff) | |
download | linux-d2c4f1928a3f7f4a1f28a0cfc022e8a145ce6903.tar.gz linux-d2c4f1928a3f7f4a1f28a0cfc022e8a145ce6903.tar.bz2 linux-d2c4f1928a3f7f4a1f28a0cfc022e8a145ce6903.zip |
virtio_net: fix missing dma unmap for resize
For rq, we have three cases getting buffers from virtio core:
1. virtqueue_get_buf{,_ctx}
2. virtqueue_detach_unused_buf
3. callback for virtqueue_resize
But in commit 295525e29a5b("virtio_net: merge dma operations when
filling mergeable buffers"), I missed the dma unmap for the #3 case.
That will leak some memory, because I did not release the pages referred
by the unused buffers.
If we do such script, we will make the system OOM.
while true
do
ethtool -G ens4 rx 128
ethtool -G ens4 rx 256
free -m
done
Fixes: 295525e29a5b ("virtio_net: merge dma operations when filling mergeable buffers")
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Message-Id: <20231226094333.47740-1-xuanzhuo@linux.alibaba.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/virtio')
0 files changed, 0 insertions, 0 deletions