aboutsummaryrefslogtreecommitdiffstats
path: root/samples/bpf/spintest_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/spintest_user.c
parentbpf: Eliminate rlimit-based memory accounting for bpf progs (diff)
downloadlinux-dev-5b0764b2d34510bc87d33a580da98f77789ac36f.tar.xz
linux-dev-5b0764b2d34510bc87d33a580da98f77789ac36f.zip
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/spintest_user.c')
-rw-r--r--samples/bpf/spintest_user.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/samples/bpf/spintest_user.c b/samples/bpf/spintest_user.c
index f090d0dc60d6..0d7e1e5a8658 100644
--- a/samples/bpf/spintest_user.c
+++ b/samples/bpf/spintest_user.c
@@ -10,7 +10,6 @@
int main(int ac, char **argv)
{
- struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
char filename[256], symbol[256];
struct bpf_object *obj = NULL;
struct bpf_link *links[20];
@@ -20,11 +19,6 @@ int main(int ac, char **argv)
const char *section;
struct ksym *sym;
- if (setrlimit(RLIMIT_MEMLOCK, &r)) {
- perror("setrlimit(RLIMIT_MEMLOCK)");
- return 1;
- }
-
if (load_kallsyms()) {
printf("failed to process /proc/kallsyms\n");
return 2;