Skip to content

Commit

Permalink
samples, bpf: Add missing munmap in xdpsock
Browse files Browse the repository at this point in the history
We mmap the umem region, but we never munmap it.
Add the missing call at the end of the cleanup.

Fixes: 3945b37 ("samples/bpf: use hugepages in xdpsock app")
Signed-off-by: Maciej Fijalkowski <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Björn Töpel <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
  • Loading branch information
mfijalko authored and borkmann committed Mar 4, 2021
1 parent c95c34f commit 6bc6699
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions samples/bpf/xdpsock_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -1699,5 +1699,7 @@ int main(int argc, char **argv)

xdpsock_cleanup();

munmap(bufs, NUM_FRAMES * opt_xsk_frame_size);

return 0;
}

0 comments on commit 6bc6699

Please sign in to comment.