Skip to content

Commit eeee4b7

Browse files
edumazetdavem330
authored andcommitted
net: add more debug info in skb_checksum_help()
This is a followup of previous patch. Dumping the stack trace is a good start, but printing basic skb information is probably better. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d7ea0d9 commit eeee4b7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

net/core/dev.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3266,15 +3266,17 @@ int skb_checksum_help(struct sk_buff *skb)
32663266

32673267
offset = skb_checksum_start_offset(skb);
32683268
ret = -EINVAL;
3269-
if (WARN_ON_ONCE(offset >= skb_headlen(skb)))
3269+
if (WARN_ON_ONCE(offset >= skb_headlen(skb))) {
3270+
DO_ONCE_LITE(skb_dump, KERN_ERR, skb, false);
32703271
goto out;
3271-
3272+
}
32723273
csum = skb_checksum(skb, offset, skb->len - offset, 0);
32733274

32743275
offset += skb->csum_offset;
3275-
if (WARN_ON_ONCE(offset + sizeof(__sum16) > skb_headlen(skb)))
3276+
if (WARN_ON_ONCE(offset + sizeof(__sum16) > skb_headlen(skb))) {
3277+
DO_ONCE_LITE(skb_dump, KERN_ERR, skb, false);
32763278
goto out;
3277-
3279+
}
32783280
ret = skb_ensure_writable(skb, offset + sizeof(__sum16));
32793281
if (ret)
32803282
goto out;

0 commit comments

Comments
 (0)