From: Eric Dumazet Date: Wed, 8 Jun 2022 16:04:36 +0000 (-0700) Subject: net: use DEBUG_NET_WARN_ON_ONCE() in skb_release_head_state() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7890e2f09d437f79e67cd37bf3e820fa0cddf2be;p=linux.git net: use DEBUG_NET_WARN_ON_ONCE() in skb_release_head_state() Remove this check from fast path unless CONFIG_DEBUG_NET=y Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski --- diff --git a/net/core/skbuff.c b/net/core/skbuff.c index b661040c100ef..cf83d9b8f41dc 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -728,7 +728,7 @@ void skb_release_head_state(struct sk_buff *skb) { skb_dst_drop(skb); if (skb->destructor) { - WARN_ON(in_hardirq()); + DEBUG_NET_WARN_ON_ONCE(in_hardirq()); skb->destructor(skb); } #if IS_ENABLED(CONFIG_NF_CONNTRACK)