Message ID | 20220403144300.6707-9-laoar.shao@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | BPF |
Headers | show |
Series | bpf: RLIMIT_MEMLOCK cleanups | expand |
diff --git a/tools/bpf/bpftool/main.c b/tools/bpf/bpftool/main.c index 451cefc2d0da..9062ef2b8767 100644 --- a/tools/bpf/bpftool/main.c +++ b/tools/bpf/bpftool/main.c @@ -508,6 +508,8 @@ int main(int argc, char **argv) * mode for loading generated skeleton. */ libbpf_set_strict_mode(LIBBPF_STRICT_ALL & ~LIBBPF_STRICT_MAP_DEFINITIONS); + } else { + libbpf_set_strict_mode(LIBBPF_STRICT_AUTO_RLIMIT_MEMLOCK); } argc -= optind;
LIBBPF_STRICT_AUTO_RLIMIT_MEMLOCK has already been set for non legacy libbpf, let's also set it for legacy libbpf then we can avoid setting the deprecatred RLIMIT_MEMLOCK directly. Signed-off-by: Yafang Shao <laoar.shao@gmail.com> --- tools/bpf/bpftool/main.c | 2 ++ 1 file changed, 2 insertions(+)