From: Yevgeny Petrilin Date: Sun, 5 Sep 2010 22:20:11 +0000 (+0000) Subject: mlx4_en: Consider napi_get_frags() failure. X-Git-Tag: MMI-PSA29.97-13-9~21994^2~533 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ebc872c7bd7155bcc7db2343155729d13bf4a2ee;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git mlx4_en: Consider napi_get_frags() failure. If failed to get skb frags using napi_get_frags(), the packet is dropped. Reported-by: Eric Dumazet Signed-off-by: Yevgeny Petrilin Signed-off-by: David S. Miller --- diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c index c4aad7f2beb9..570f2508fb30 100644 --- a/drivers/net/mlx4/en_rx.c +++ b/drivers/net/mlx4/en_rx.c @@ -591,6 +591,8 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud * - not an IP fragment */ if (dev->features & NETIF_F_GRO) { struct sk_buff *gro_skb = napi_get_frags(&cq->napi); + if (!gro_skb) + goto next; nr = mlx4_en_complete_rx_desc( priv, rx_desc,