[PATCH bpf] libbpf: fix map index used in error message

Subsystems: bpf [general] (safe dynamic programs and tools), bpf [library] (libbpf), the rest

STALE2206d LANDED

Landed in mainline as 1e891e513e16 on 2020-08-20.

3 messages, 3 authors, 2020-08-20 · open the first message on its own page

[PATCH bpf] libbpf: fix map index used in error message

From: Toke Høiland-Jørgensen <hidden>
Date: 2020-08-19 11:05:54

The error message emitted by bpf_object__init_user_btf_maps() was using the
wrong section ID.

Signed-off-by: Toke Høiland-Jørgensen <redacted>
---
 tools/lib/bpf/libbpf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 5d20b2da4427..0ad0b0491e1f 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -2264,7 +2264,7 @@ static int bpf_object__init_user_btf_maps(struct bpf_object *obj, bool strict,
 		data = elf_getdata(scn, NULL);
 	if (!scn || !data) {
 		pr_warn("failed to get Elf_Data from map section %d (%s)\n",
-			obj->efile.maps_shndx, MAPS_ELF_SEC);
+			obj->efile.btf_maps_shndx, MAPS_ELF_SEC);
 		return -EINVAL;
 	}
 
-- 
2.28.0

Re: [PATCH bpf] libbpf: fix map index used in error message

From: Yonghong Song <hidden>
Date: 2020-08-19 15:43:09


On 8/19/20 4:05 AM, Toke Høiland-Jørgensen wrote:
The error message emitted by bpf_object__init_user_btf_maps() was using the
wrong section ID.

Signed-off-by: Toke Høiland-Jørgensen <redacted>
Acked-by: Yonghong Song <redacted>

Re: [PATCH bpf] libbpf: fix map index used in error message

From: Daniel Borkmann <daniel@iogearbox.net>
Date: 2020-08-20 14:22:51

On 8/19/20 1:05 PM, Toke Høiland-Jørgensen wrote:
The error message emitted by bpf_object__init_user_btf_maps() was using the
wrong section ID.

Signed-off-by: Toke Høiland-Jørgensen <redacted>
Applied, thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help