Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH bpf] libbpf: fix map index used in error message
@ 2020-08-19 11:05 Toke Høiland-Jørgensen
  2020-08-19 15:42 ` Yonghong Song
  2020-08-20 14:22 ` Daniel Borkmann
  0 siblings, 2 replies; 3+ messages in thread
From: Toke Høiland-Jørgensen @ 2020-08-19 11:05 UTC (permalink / raw)
  To: daniel, ast; +Cc: Toke Høiland-Jørgensen, bpf, netdev

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 <toke@redhat.com>
---
 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf] libbpf: fix map index used in error message
  2020-08-19 11:05 [PATCH bpf] libbpf: fix map index used in error message Toke Høiland-Jørgensen
@ 2020-08-19 15:42 ` Yonghong Song
  2020-08-20 14:22 ` Daniel Borkmann
  1 sibling, 0 replies; 3+ messages in thread
From: Yonghong Song @ 2020-08-19 15:42 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen, daniel, ast; +Cc: bpf, netdev



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 <toke@redhat.com>

Acked-by: Yonghong Song <yhs@fb.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf] libbpf: fix map index used in error message
  2020-08-19 11:05 [PATCH bpf] libbpf: fix map index used in error message Toke Høiland-Jørgensen
  2020-08-19 15:42 ` Yonghong Song
@ 2020-08-20 14:22 ` Daniel Borkmann
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Borkmann @ 2020-08-20 14:22 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen, ast; +Cc: bpf, netdev

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 <toke@redhat.com>

Applied, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-20 14:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19 11:05 [PATCH bpf] libbpf: fix map index used in error message Toke Høiland-Jørgensen
2020-08-19 15:42 ` Yonghong Song
2020-08-20 14:22 ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).