]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
samples, bpf: Add missing munmap in xdpsock
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Wed, 3 Mar 2021 18:56:35 +0000 (19:56 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 4 Mar 2021 14:53:32 +0000 (15:53 +0100)
We mmap the umem region, but we never munmap it.
Add the missing call at the end of the cleanup.

Fixes: 3945b37a975d ("samples/bpf: use hugepages in xdpsock app")
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Link: https://lore.kernel.org/bpf/20210303185636.18070-3-maciej.fijalkowski@intel.com
samples/bpf/xdpsock_user.c

index db0cb73513a58bdb8e2f346b4ef028aeb975e422..1e2a1105d0e67aba88a2bd4a3ab4998b549acdcb 100644 (file)
@@ -1699,5 +1699,7 @@ int main(int argc, char **argv)
 
        xdpsock_cleanup();
 
+       munmap(bufs, NUM_FRAMES * opt_xsk_frame_size);
+
        return 0;
 }