Skip to content
/ linux Public

Commit dcf9b3c

Browse files
ummakynesSasha Levin
authored andcommitted
net: remove WARN_ON_ONCE when accessing forward path array
[ Upstream commit 008e7a7 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 7642223 commit dcf9b3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/dev.c

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

698-
if (WARN_ON_ONCE(k >= NET_DEVICE_PATH_STACK_MAX))
698+
if (k >= NET_DEVICE_PATH_STACK_MAX)
699699
return NULL;
700700

701701
return &stack->path[k];

0 commit comments

Comments
 (0)