[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231013163034.73314060@canb.auug.org.au>
Date: Fri, 13 Oct 2023 16:30:34 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>,
Andrii Nakryiko <andrii@...nel.org>
Cc: bpf <bpf@...r.kernel.org>, Networking <netdev@...r.kernel.org>,
Daan De Meyer <daan.j.demeyer@...il.com>,
Martin KaFai Lau <martin.lau@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build warning after merge of the bpf-next tree
Hi all,
On Fri, 13 Oct 2023 11:40:07 +1100 Stephen Rothwell <sfr@...b.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@...b.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@...b.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
sin->sin_family = AF_INET;
lock_sock(sk);
--
2.40.1
--
Cheers,
Stephen Rothwell
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists