From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: daniel@iogearbox.net, ast@kernel.org, bpf@vger.kernel.org
Cc: bjorn.topel@intel.com, magnus.karlsson@intel.com,
john.fastabend@gmail.com,
Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Subject: [PATCH bpf 2/3] samples: bpf: add missing munmap in xdpsock
Date: Wed, 3 Mar 2021 16:51:56 +0100 [thread overview]
Message-ID: <20210303155158.15953-3-maciej.fijalkowski@intel.com> (raw)
In-Reply-To: <20210303155158.15953-1-maciej.fijalkowski@intel.com>
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>
---
samples/bpf/xdpsock_user.c | 2 ++
1 file changed, 2 insertions(+)
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;
}
--
2.20.1
next prev parent reply other threads:[~2021-03-03 22:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-03 15:51 [PATCH bpf 0/3] AF_XDP small fixes Maciej Fijalkowski
2021-03-03 15:51 ` [PATCH bpf 1/3] xsk: remove dangling function declaration from header file Maciej Fijalkowski
2021-03-03 16:33 ` Björn Töpel
2021-03-03 15:51 ` Maciej Fijalkowski [this message]
2021-03-03 16:33 ` [PATCH bpf 2/3] samples: bpf: add missing munmap in xdpsock Björn Töpel
2021-03-03 15:51 ` [PATCH bpf 3/3] libbpf: clear map_info before each bpf_obj_get_info_by_fd Maciej Fijalkowski
2021-03-03 16:33 ` Björn Töpel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210303155158.15953-3-maciej.fijalkowski@intel.com \
--to=maciej.fijalkowski@intel.com \
--cc=ast@kernel.org \
--cc=bjorn.topel@intel.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=magnus.karlsson@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).