summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>2021-03-03 19:56:35 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2021-03-04 15:53:32 +0100
commit6bc6699881012b5bd5d49fa861a69a37fc01b49c (patch)
tree804da7a18fb0d07f50cb3dd4a12a63bb5b30bb0c /samples
parentxsk: Remove dangling function declaration from header file (diff)
downloadlinux-6bc6699881012b5bd5d49fa861a69a37fc01b49c.tar.xz
linux-6bc6699881012b5bd5d49fa861a69a37fc01b49c.zip
samples, bpf: Add missing munmap in xdpsock
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
Diffstat (limited to 'samples')
-rw-r--r--samples/bpf/xdpsock_user.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c
index db0cb73513a5..1e2a1105d0e6 100644
--- a/samples/bpf/xdpsock_user.c
+++ b/samples/bpf/xdpsock_user.c
@@ -1699,5 +1699,7 @@ int main(int argc, char **argv)
xdpsock_cleanup();
+ munmap(bufs, NUM_FRAMES * opt_xsk_frame_size);
+
return 0;
}