net: add truesize debug checks in skb_{add|coalesce}_rx_frag()
authorEric Dumazet <edumazet@google.com>
Wed, 13 Sep 2023 13:48:41 +0000 (13:48 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 16 Sep 2023 09:10:27 +0000 (10:10 +0100)
commitc123e0d30bdb54a0f91ec348827eef76877165d8
treeef95571b1f5538b29fe0adbf557bdfdb3239d96f
parent41862d12e77f78b4ecb59b028bf44de92991bda2
net: add truesize debug checks in skb_{add|coalesce}_rx_frag()

It can be time consuming to track driver bugs, that might be detected
too late from this confusing warning in skb_try_coalesce()

WARN_ON_ONCE(delta < len);

Add sanity check in skb_add_rx_frag() and skb_coalesce_rx_frag()
to better track bug origin for CONFIG_DEBUG_NET=y builds.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c