diff mbox series

[bpf,v2,2/3] samples: bpf: add missing munmap in xdpsock

Message ID 20210303185636.18070-3-maciej.fijalkowski@intel.com (mailing list archive)
State Accepted
Commit 6bc6699881012b5bd5d49fa861a69a37fc01b49c
Delegated to: BPF
Headers show
Series AF_XDP small fixes | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for bpf
netdev/subject_prefix success Link
netdev/cc_maintainers fail 2 blamed authors not CCed: kevin.laatz@intel.com jonathan.lemon@gmail.com; 12 maintainers not CCed: kevin.laatz@intel.com kuba@kernel.org hawk@kernel.org jonathan.lemon@gmail.com yhs@fb.com netdev@vger.kernel.org bjorn@kernel.org kpsingh@kernel.org songliubraving@fb.com kafai@fb.com davem@davemloft.net andrii@kernel.org
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Maciej Fijalkowski March 3, 2021, 6:56 p.m. UTC
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")
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
---
 samples/bpf/xdpsock_user.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

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;
 }