[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z-LVKpVcH_epgV9B@krikkit>
Date: Tue, 25 Mar 2025 17:09:14 +0100
From: Sabrina Dubroca <sd@...asysnail.net>
To: Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Simon Horman <horms@...nel.org>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>,
David Ahern <dsahern@...nel.org>,
Nathan Chancellor <nathan@...nel.org>
Subject: Re: [PATCH net-next v2 2/5] udp_tunnel: fix compile warning
2025-03-21, 12:52:53 +0100, Paolo Abeni wrote:
> Nathan reported that the compiler is not happy to use a zero
> size udp_tunnel_gro_types array:
>
> net/ipv4/udp_offload.c:130:8: warning: array index 0 is past the end of the array (that has type 'struct udp_tunnel_type_entry[0]') [-Warray-bounds]
> 130 | udp_tunnel_gro_types[0].gro_receive);
> | ^ ~
> include/linux/static_call.h:154:42: note: expanded from macro 'static_call_update'
> 154 | typeof(&STATIC_CALL_TRAMP(name)) __F = (func); \
> | ^~~~
> net/ipv4/udp_offload.c:47:1: note: array 'udp_tunnel_gro_types' declared here
> 47 | static struct udp_tunnel_type_entry udp_tunnel_gro_types[UDP_MAX_TUNNEL_TYPES];
> | ^
> 1 warning generated.
>
> In such (unusual) configuration we should skip entirely the
> static call optimization accounting.
>
> Reported-by: syzbot+8c469a2260132cd095c1@...kaller.appspotmail.com
> Closes: https://lore.kernel.org/netdev/cover.1741718157.git.pabeni@redhat.com/T/#m6e309a49f04330de81a618c3c166368252ba42e4
> Fixes: 311b36574ceac ("udp_tunnel: use static call for GRO hooks when possible")
> Signed-off-by: Paolo Abeni <pabeni@...hat.com>
Reviewed-by: Sabrina Dubroca <sd@...asysnail.net>
--
Sabrina
Powered by blists - more mailing lists