Re: [PATCH bpf-next 2/2] bpftool: Fix error check when calling hashmap__new()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 7, 2022 at 7:26 AM Mauricio Vásquez <mauricio@xxxxxxxxxx> wrote:
>
> hashmap__new() encodes errors with ERR_PTR(), hence it's not valid to
> check the returned pointer against NULL and IS_ERR() has to be used
> instead.
>
> libbpf_get_error() can't be used in this case as hashmap__new() is not
> part of the public libbpf API and it'll continue using ERR_PTR() after
> libbpf 1.0.
>
> Fixes: 8f184732b60b ("bpftool: Switch to libbpf's hashmap for pinned paths of BPF objects")
> Fixes: 2828d0d75b73 ("bpftool: Switch to libbpf's hashmap for programs/maps in BTF listing")
> Fixes: d6699f8e0f83 ("bpftool: Switch to libbpf's hashmap for PIDs/names references")
>
> Signed-off-by: Mauricio Vásquez <mauricio@xxxxxxxxxx>

Acked-by: Song Liu <songliubraving@xxxxxx>




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux