diff options
author | Xuan Zhuo <[email protected]> | 2023-12-26 17:43:33 +0800 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2024-01-03 16:45:02 -0800 |
commit | 2311e06b9bf3d44e15f9175af177a782806f688f (patch) | |
tree | 7072b1589b3951a7f5841bb2254e19e8fe035e4e /kernel/bpf/arraymap.c | |
parent | 01b2885d9415152bcb12ff1f7788f500a74ea0ed (diff) |
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 <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'kernel/bpf/arraymap.c')
0 files changed, 0 insertions, 0 deletions