diff options
author | Maciej Fijalkowski <maciej.fijalkowski@intel.com> | 2021-03-03 21:56:35 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-17 19:06:12 +0300 |
commit | f126147970a11eb4a686d30bd0740de3de2cd6c8 (patch) | |
tree | 81bc50ec24530be52bc8b6444d47b1a85c658052 /samples | |
parent | 4d2cdb2ded60a6aae748ac61ae3919a3b037f26c (diff) | |
download | linux-f126147970a11eb4a686d30bd0740de3de2cd6c8.tar.xz |
samples, bpf: Add missing munmap in xdpsock
commit 6bc6699881012b5bd5d49fa861a69a37fc01b49c upstream.
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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'samples')
-rw-r--r-- | samples/bpf/xdpsock_user.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index 33c58de58626..3edae9018893 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c @@ -1543,5 +1543,7 @@ int main(int argc, char **argv) xdpsock_cleanup(); + munmap(bufs, NUM_FRAMES * opt_xsk_frame_size); + return 0; } |