diff options
author | Wolfram Sang <wsa@kernel.org> | 2020-05-20 15:27:45 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2020-05-20 15:27:45 +0200 |
commit | f89c326dcaa0cb8c3af7764e75eeed4e3f3c879a (patch) | |
tree | 31a5967da1f04180a1a922258f6947ad17255ee8 /tools/bpf/bpftool/struct_ops.c | |
parent | i2c: core: support bus regulator controlling in adapter (diff) | |
parent | MAINTAINERS: add maintainer for mediatek i2c controller driver (diff) | |
download | linux-f89c326dcaa0cb8c3af7764e75eeed4e3f3c879a.tar.xz linux-f89c326dcaa0cb8c3af7764e75eeed4e3f3c879a.zip |
Merge branch 'i2c/for-current-fixed' into i2c/for-5.8
Diffstat (limited to 'tools/bpf/bpftool/struct_ops.c')
-rw-r--r-- | tools/bpf/bpftool/struct_ops.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/bpf/bpftool/struct_ops.c b/tools/bpf/bpftool/struct_ops.c index 2a7befbd11ad..e17738479edc 100644 --- a/tools/bpf/bpftool/struct_ops.c +++ b/tools/bpf/bpftool/struct_ops.c @@ -479,6 +479,7 @@ static int do_unregister(int argc, char **argv) static int do_register(int argc, char **argv) { + struct bpf_object_load_attr load_attr = {}; const struct bpf_map_def *def; struct bpf_map_info info = {}; __u32 info_len = sizeof(info); @@ -499,7 +500,12 @@ static int do_register(int argc, char **argv) set_max_rlimit(); - if (bpf_object__load(obj)) { + load_attr.obj = obj; + if (verifier_logs) + /* log_level1 + log_level2 + stats, but not stable UAPI */ + load_attr.log_level = 1 + 2 + 4; + + if (bpf_object__load_xattr(&load_attr)) { bpf_object__close(obj); return -1; } @@ -591,6 +597,8 @@ int do_struct_ops(int argc, char **argv) err = cmd_select(cmds, argc, argv, do_help); - btf__free(btf_vmlinux); + if (!IS_ERR(btf_vmlinux)) + btf__free(btf_vmlinux); + return err; } |