Re: [PATCH bpf-next] selftests/bpf: don't destroy failed link

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

 



On Tue, Jul 28, 2020 at 11:51 PM Andrii Nakryiko <andriin@xxxxxx> wrote:
>
> Check that link is NULL or proper pointer before invoking bpf_link__destroy().
> Not doing this causes crash in test_progs, when cg_storage_multi selftest
> fails.
>
> Cc: YiFei Zhu <zhuyifei@xxxxxxxxxx>
> Fixes: 3573f384014f ("selftests/bpf: Test CGROUP_STORAGE behavior on shared egress + ingress")
> Signed-off-by: Andrii Nakryiko <andriin@xxxxxx>
> ---
>  .../bpf/prog_tests/cg_storage_multi.c         | 42 ++++++++++++-------
>  1 file changed, 28 insertions(+), 14 deletions(-)
>

Awesome! Thanks for the fix. I did not realize the return was a -errno
rather than NULL like open_and_load.



[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