summaryrefslogtreecommitdiff
path: root/samples/bpf/sockex2_user.c
diff options
context:
space:
mode:
authorRoman Gushchin <guro@fb.com>2020-12-01 13:59:00 -0800
committerAlexei Starovoitov <ast@kernel.org>2020-12-02 18:32:47 -0800
commit5b0764b2d34510bc87d33a580da98f77789ac36f (patch)
treebd80a792599f564fcbcf074a0e7618a9d71b2fd8 /samples/bpf/sockex2_user.c
parent3ac1f01b43b6e2759cc34d3a715ba5eed04c5805 (diff)
bpf: samples: Do not touch RLIMIT_MEMLOCK
Since bpf is not using rlimit memlock for the memory accounting and control, do not change the limit in sample applications. Signed-off-by: Roman Gushchin <guro@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Song Liu <songliubraving@fb.com> Link: https://lore.kernel.org/bpf/20201201215900.3569844-35-guro@fb.com
Diffstat (limited to 'samples/bpf/sockex2_user.c')
-rw-r--r--samples/bpf/sockex2_user.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/samples/bpf/sockex2_user.c b/samples/bpf/sockex2_user.c
index af925a5afd1d..bafa567b840c 100644
--- a/samples/bpf/sockex2_user.c
+++ b/samples/bpf/sockex2_user.c
@@ -16,7 +16,6 @@ struct pair {
int main(int ac, char **argv)
{
- struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
struct bpf_object *obj;
int map_fd, prog_fd;
char filename[256];
@@ -24,7 +23,6 @@ int main(int ac, char **argv)
FILE *f;
snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]);
- setrlimit(RLIMIT_MEMLOCK, &r);
if (bpf_prog_load(filename, BPF_PROG_TYPE_SOCKET_FILTER,
&obj, &prog_fd))