From: Pablo Neira Ayuso Date: Tue, 17 Feb 2026 11:56:39 +0000 (+0100) Subject: net: remove WARN_ON_ONCE when accessing forward path array X-Git-Tag: v7.0-rc1~44^2~8^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=008e7a7c293b30bc43e4368dac6ea3808b75a572;p=thirdparty%2Fkernel%2Flinux.git net: remove WARN_ON_ONCE when accessing forward path array Although unlikely, recent support for IPIP tunnels increases chances of reaching this WARN_ON_ONCE if userspace manages to build a sufficiently long forward path. Remove it. Fixes: ddb94eafab8b ("net: resolve forwarding path from virtual netdevice and HW destination address") Signed-off-by: Pablo Neira Ayuso Signed-off-by: Florian Westphal --- diff --git a/net/core/dev.c b/net/core/dev.c index 96f89eb797e8..096b3ff13f6b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -744,7 +744,7 @@ static struct net_device_path *dev_fwd_path(struct net_device_path_stack *stack) { int k = stack->num_paths++; - if (WARN_ON_ONCE(k >= NET_DEVICE_PATH_STACK_MAX)) + if (k >= NET_DEVICE_PATH_STACK_MAX) return NULL; return &stack->path[k];