[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <048c6575cb97baa4b7022a1b0a061fa0aecf3db0.camel@gmail.com>
Date: Mon, 24 Jun 2024 13:08:53 -0700
From: Eduard Zingerman <eddyz87@...il.com>
To: Geliang Tang <geliang@...nel.org>, John Fastabend
<john.fastabend@...il.com>, Jakub Sitnicki <jakub@...udflare.com>, "David
S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, David
Ahern <dsahern@...nel.org>, Andrii Nakryiko <andrii@...nel.org>, Mykola
Lysenko <mykolal@...com>, Alexei Starovoitov <ast@...nel.org>, Daniel
Borkmann <daniel@...earbox.net>, Martin KaFai Lau <martin.lau@...ux.dev>,
Song Liu <song@...nel.org>, Yonghong Song <yonghong.song@...ux.dev>, KP
Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...gle.com>, Hao Luo
<haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>, Shuah Khan
<shuah@...nel.org>, Mykyta Yatsenko <yatsenko@...a.com>, Miao Xu
<miaxu@...a.com>, Yuran Pereira <yuran.pereira@...mail.com>
Cc: Geliang Tang <tanggeliang@...inos.cn>, netdev@...r.kernel.org,
bpf@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net 3/3] selftests/bpf: Null checks for link in
bpf_tcp_ca
On Mon, 2024-06-24 at 21:27 +0800, Geliang Tang wrote:
[...]
> diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c b/tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c
> index bceff5900016..8c0306f344e9 100644
> --- a/tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c
> +++ b/tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c
> @@ -411,7 +411,8 @@ static void test_update_ca(void)
> return;
>
> link = bpf_map__attach_struct_ops(skel->maps.ca_update_1);
> - ASSERT_OK_PTR(link, "attach_struct_ops");
> + if (!ASSERT_OK_PTR(link, "attach_struct_ops"))
> + return;
At this point the 'skel' is initialized and needs a call to
tcp_ca_update__destroy(). Please add a label at the end of this
function and goto there instead of 'return'.
Same problem in the rest of the hunks.
[...]
Powered by blists - more mailing lists