OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f131bd3
)
libbpf: Return err if bpf_object__load failed
author
Mao Wenan
<maowenan@huawei.com>
Sun, 26 Apr 2020 06:36:35 +0000
(14:36 +0800)
committer
Daniel Borkmann
<daniel@iogearbox.net>
Mon, 27 Apr 2020 12:43:20 +0000
(14:43 +0200)
bpf_object__load() has various return code, when it failed to load
object, it must return err instead of -EINVAL.
Signed-off-by: Mao Wenan <maowenan@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link:
https://lore.kernel.org/bpf/20200426063635.130680-3-maowenan@huawei.com
tools/lib/bpf/libbpf.c
patch
|
blob
|
history
diff --git
a/tools/lib/bpf/libbpf.c
b/tools/lib/bpf/libbpf.c
index
8f480e2
..
8e1dc69
100644
(file)
--- a/
tools/lib/bpf/libbpf.c
+++ b/
tools/lib/bpf/libbpf.c
@@
-7006,7
+7006,7
@@
int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr,
err = bpf_object__load(obj);
if (err) {
bpf_object__close(obj);
- return
-EINVAL
;
+ return
err
;
}
*pobj = obj;