aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAaron Conole <aconole@bytheb.org>2016-04-02 15:26:43 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-05 19:58:39 -0400
commit4da46cebbd3b4dc445195a9672c99c1353af5695 (patch)
tree55faa41d69d4a5042c6fc957dbb58fd7aadea9e5 /net
parentibmvnic: enable RX checksum offload (diff)
downloadlinux-dev-4da46cebbd3b4dc445195a9672c99c1353af5695.tar.xz
linux-dev-4da46cebbd3b4dc445195a9672c99c1353af5695.zip
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 <aconole@bytheb.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index b9bcbe77d913..273f10d1e306 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4663,6 +4663,8 @@ static struct sk_buff *napi_frags_skb(struct napi_struct *napi)
if (unlikely(skb_gro_header_hard(skb, hlen))) {
eth = skb_gro_header_slow(skb, hlen, 0);
if (unlikely(!eth)) {
+ net_warn_ratelimited("%s: dropping impossible skb from %s\n",
+ __func__, napi->dev->name);
napi_reuse_skb(napi, skb);
return NULL;
}