lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 15 Jul 2020 11:13:53 +0800 From: YueHaibing <yuehaibing@...wei.com> To: <ast@...nel.org>, <daniel@...earbox.net>, <kafai@...com>, <songliubraving@...com>, <yhs@...com>, <andriin@...com>, <john.fastabend@...il.com>, <kpsingh@...omium.org> CC: <netdev@...r.kernel.org>, <bpf@...r.kernel.org>, <linux-kernel@...r.kernel.org>, YueHaibing <yuehaibing@...wei.com> Subject: [PATCH] tools/bpftool: Fix error return code in do_skeleton() The error return code should be PTR_ERR(obj) other than PTR_ERR(NULL). Fixes: 5dc7a8b21144 ("bpftool, selftests/bpf: Embed object file inside skeleton") Signed-off-by: YueHaibing <yuehaibing@...wei.com> --- tools/bpf/bpftool/gen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c index 10de76b296ba..35f62273cdbd 100644 --- a/tools/bpf/bpftool/gen.c +++ b/tools/bpf/bpftool/gen.c @@ -305,8 +305,9 @@ static int do_skeleton(int argc, char **argv) opts.object_name = obj_name; obj = bpf_object__open_mem(obj_data, file_sz, &opts); if (IS_ERR(obj)) { + err = PTR_ERR(obj); + p_err("failed to open BPF object file: %ld", err); obj = NULL; - p_err("failed to open BPF object file: %ld", PTR_ERR(obj)); goto out; } -- 2.17.1
Powered by blists - more mailing lists