From: Martin KaFai Lau <martin.lau@linux.dev>
To: Stephen Rothwell <sfr@canb.auug.org.au>,
Daan De Meyer <daan.j.demeyer@gmail.com>
Cc: bpf <bpf@vger.kernel.org>, Networking <netdev@vger.kernel.org>,
Martin KaFai Lau <martin.lau@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>
Subject: Re: linux-next: build warning after merge of the bpf-next tree
Date: Fri, 13 Oct 2023 09:54:35 -0700 [thread overview]
Message-ID: <58ed787f-a3b1-58d3-74a5-3a6e8c4c970a@linux.dev> (raw)
In-Reply-To: <20231013163034.73314060@canb.auug.org.au>
On 10/12/23 10:30 PM, Stephen Rothwell wrote:
> Hi all,
>
> On Fri, 13 Oct 2023 11:40:07 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>> After merging the bpf-next tree, today's linux-next build (arm
>> multi_v7_defconfig) produced this warning:
>>
>> net/ipv4/af_inet.c: In function 'inet_getname':
>> net/ipv4/af_inet.c:791:13: warning: unused variable 'sin_addr_len' [-Wunused-variable]
>> 791 | int sin_addr_len = sizeof(*sin);
>> | ^~~~~~~~~~~~
>>
>> Introduced by commit
>>
>> fefba7d1ae19 ("bpf: Propagate modified uaddrlen from cgroup sockaddr programs")
>
> This became a build failure for the i386 defconfig build, so I applied
> the following patch:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 13 Oct 2023 16:25:08 +1100
> Subject: [PATCH] fix up for "bpf: Propagate modified uaddrlen from cgroup sockaddr programs"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> net/ipv4/af_inet.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
> index 7e27ad37b939..0fcab6b6cb04 100644
> --- a/net/ipv4/af_inet.c
> +++ b/net/ipv4/af_inet.c
> @@ -788,7 +788,9 @@ int inet_getname(struct socket *sock, struct sockaddr *uaddr,
> struct sock *sk = sock->sk;
> struct inet_sock *inet = inet_sk(sk);
> DECLARE_SOCKADDR(struct sockaddr_in *, sin, uaddr);
> +#ifdef CONFIG_CGROUP_BPF
> int sin_addr_len = sizeof(*sin);
> +#endif
Thanks for the report and taking care of it.
Daan, something that was missed in ipv4 getname. It should be done similar to
inet6_getname() in af_inet6.c such that it "return sin_addr_len;" in this
function to avoid the compiler warning here in ipv4.
next prev parent reply other threads:[~2023-10-13 16:54 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 0:40 linux-next: build warning after merge of the bpf-next tree Stephen Rothwell
2023-10-13 5:30 ` Stephen Rothwell
2023-10-13 16:54 ` Martin KaFai Lau [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-06-27 7:47 Stephen Rothwell
2025-06-27 8:22 ` Viktor Malik
2025-05-12 8:49 Stephen Rothwell
2025-05-13 16:08 ` Andrii Nakryiko
2024-02-06 4:33 Stephen Rothwell
2023-02-15 3:45 Stephen Rothwell
2023-02-06 3:54 Stephen Rothwell
2023-02-06 3:59 ` Alexei Starovoitov
2021-12-05 23:55 Stephen Rothwell
2021-12-06 0:43 ` Stephen Rothwell
2021-12-07 3:22 ` Andrii Nakryiko
2020-11-11 1:01 Stephen Rothwell
2020-11-11 14:03 ` Qian Cai
2020-11-11 18:15 ` Andrii Nakryiko
2020-07-14 2:16 Stephen Rothwell
2020-07-14 9:00 ` Jiri Olsa
2020-07-14 9:27 ` Geert Uytterhoeven
2020-07-14 10:33 ` Stephen Rothwell
2020-07-14 10:47 ` Jiri Olsa
2020-07-14 11:15 ` Jiri Olsa
2020-07-14 14:54 ` Alexei Starovoitov
2019-10-17 23:56 Stephen Rothwell
2019-10-18 5:01 ` Alexei Starovoitov
2019-10-28 0:02 ` Stephen Rothwell
2020-01-10 22:28 ` Alexandre Ghiti
2020-01-10 23:18 ` Alexei Starovoitov
2020-01-11 14:06 ` Alexandre Ghiti
2020-01-11 0:20 ` Palmer Dabbelt
2020-01-11 14:31 ` Alexandre Ghiti
2020-01-13 4:33 ` Zong Li
2020-01-14 5:23 ` Alexei Starovoitov
2020-01-15 20:48 ` Alexandre Ghiti
2019-03-24 22:28 Stephen Rothwell
2019-03-24 22:39 ` Willem de Bruijn
2018-05-09 4:49 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58ed787f-a3b1-58d3-74a5-3a6e8c4c970a@linux.dev \
--to=martin.lau@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daan.j.demeyer@gmail.com \
--cc=daniel@iogearbox.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=martin.lau@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox