]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: remove WARN_ON_ONCE when accessing forward path array
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 17 Feb 2026 11:56:39 +0000 (12:56 +0100)
committerFlorian Westphal <fw@strlen.de>
Tue, 17 Feb 2026 14:04:20 +0000 (15:04 +0100)
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 <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
net/core/dev.c

index 96f89eb797e891c75f7e9b467e27db7c1a6f92ae..096b3ff13f6b9bf685cb74d0e762a2b00e97d9de 100644 (file)
@@ -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];