Skip to content

Commit 008e7a7

Browse files
ummakynesFlorian Westphal
authored andcommitted
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: ddb94ea ("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>
1 parent 8fde939 commit 008e7a7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/core/dev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ static struct net_device_path *dev_fwd_path(struct net_device_path_stack *stack)
744744
{
745745
int k = stack->num_paths++;
746746

747-
if (WARN_ON_ONCE(k >= NET_DEVICE_PATH_STACK_MAX))
747+
if (k >= NET_DEVICE_PATH_STACK_MAX)
748748
return NULL;
749749

750750
return &stack->path[k];

0 commit comments

Comments
 (0)