Skip to content

Commit 4da46ce

Browse files
apconoledavem330
authored andcommitted
net/core/dev: Warn on a too-short GRO frame
When signaling that a GRO frame is ready to be processed, the network stack correctly checks length and aborts processing when a frame is less than 14 bytes. However, such a condition is really indicative of a broken driver, and should be loudly signaled, rather than silently dropped as the case is today. Convert the condition to use net_warn_ratelimited() to ensure the stack loudly complains about such broken drivers. Signed-off-by: Aaron Conole <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9be02cd commit 4da46ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/core/dev.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4663,6 +4663,8 @@ static struct sk_buff *napi_frags_skb(struct napi_struct *napi)
46634663
if (unlikely(skb_gro_header_hard(skb, hlen))) {
46644664
eth = skb_gro_header_slow(skb, hlen, 0);
46654665
if (unlikely(!eth)) {
4666+
net_warn_ratelimited("%s: dropping impossible skb from %s\n",
4667+
__func__, napi->dev->name);
46664668
napi_reuse_skb(napi, skb);
46674669
return NULL;
46684670
}

0 commit comments

Comments
 (0)