mlx4_en: Consider napi_get_frags() failure.
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>
Sun, 5 Sep 2010 22:20:11 +0000 (22:20 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Sep 2010 01:48:44 +0000 (18:48 -0700)
If failed to get skb frags using napi_get_frags(),
the packet is dropped.

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/mlx4/en_rx.c

index c4aad7f2beb90aca718d7acfab19fa3a284c8745..570f2508fb30b423982ae14f228ef1e3539f13b4 100644 (file)
@@ -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,