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 <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Eric Dumazet 2022-06-08 09:04:36 -07:00 committed by Jakub Kicinski
parent dd29c67dbb
commit 7890e2f09d

View File

@ -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)