diff mbox

[1/2] mlx4_en: Consider napi_get_frags() failure.

Message ID 4C84A43B.5010605@mellanox.co.il
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Yevgeny Petrilin Sept. 6, 2010, 8:20 a.m. UTC
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>
---
 drivers/net/mlx4/en_rx.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

David Miller Sept. 7, 2010, 1:39 a.m. UTC | #1
From: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Date: Mon, 6 Sep 2010 11:20:11 +0300

> 
> 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>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c
index c4aad7f..570f250 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,