aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-06-08 09:04:32 -0700
committerJakub Kicinski <kuba@kernel.org>2022-06-09 21:53:55 -0700
commit76458faeb285b1536abc3e75ea318564543269c3 (patch)
tree1522190e6be02161ffba07a3b9adf002a559d9b8 /net/core/dev.c
parent63fbdd3c77ec216a91a87d22821d2ecd96669a5d (diff)
downloadlinux-76458faeb285b1536abc3e75ea318564543269c3.tar.gz
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>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 511cf5d3aade6..39cb9055da37e 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3925,7 +3925,7 @@ int dev_loopback_xmit(struct net *net, struct sock *sk, struct sk_buff *skb)
skb->pkt_type = PACKET_LOOPBACK;
if (skb->ip_summed == CHECKSUM_NONE)
skb->ip_summed = CHECKSUM_UNNECESSARY;
- WARN_ON(!skb_dst(skb));
+ DEBUG_NET_WARN_ON_ONCE(!skb_dst(skb));
skb_dst_force(skb);
netif_rx(skb);
return 0;