Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: use DEBUG_NET_WARN_ON_ONCE() in dev_loopback_xmit()

One check in dev_loopback_xmit() has not caught issues
in the past.

Keep it for CONFIG_DEBUG_NET=y builds only.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Eric Dumazet and committed by
Jakub Kicinski
76458fae 63fbdd3c

+1 -1
+1 -1
net/core/dev.c
··· 3925 3925 skb->pkt_type = PACKET_LOOPBACK; 3926 3926 if (skb->ip_summed == CHECKSUM_NONE) 3927 3927 skb->ip_summed = CHECKSUM_UNNECESSARY; 3928 - WARN_ON(!skb_dst(skb)); 3928 + DEBUG_NET_WARN_ON_ONCE(!skb_dst(skb)); 3929 3929 skb_dst_force(skb); 3930 3930 netif_rx(skb); 3931 3931 return 0;