mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 10:19:47 +00:00
libbpf: Fix map index used in error message
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> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20200819110534.9058-1-toke@redhat.com
This commit is contained in:
parent
00fa1d83a8
commit
1e891e513e
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue