]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - samples/bpf/tracex5_user.c
Merge tag 'drm-for-v4.9' of git://people.freedesktop.org/~airlied/linux
[karo-tx-linux.git] / samples / bpf / tracex5_user.c
index a04dd3cd43580dacfec29265221746d9a2a3f404..36b5925bb137f7a185dab9d4b74fc3c62ab8e4c8 100644 (file)
@@ -6,6 +6,7 @@
 #include <sys/prctl.h>
 #include "libbpf.h"
 #include "bpf_load.h"
+#include <sys/resource.h>
 
 /* install fake seccomp program to enable seccomp code path inside the kernel,
  * so that our kprobe attached to seccomp_phase1() can be triggered
@@ -27,8 +28,10 @@ int main(int ac, char **argv)
 {
        FILE *f;
        char filename[256];
+       struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
 
        snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]);
+       setrlimit(RLIMIT_MEMLOCK, &r);
 
        if (load_bpf_file(filename)) {
                printf("%s", bpf_log_buf);