netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mlx4_en: Consider napi_get_frags() failure.
@ 2010-09-06  8:20 Yevgeny Petrilin
  2010-09-07  1:39 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Yevgeny Petrilin @ 2010-09-06  8:20 UTC (permalink / raw)
  To: davem, eric.dumazet; +Cc: netdev, yevgenyp, eugenia


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

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] mlx4_en: Consider napi_get_frags() failure.
  2010-09-06  8:20 [PATCH 1/2] mlx4_en: Consider napi_get_frags() failure Yevgeny Petrilin
@ 2010-09-07  1:39 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-09-07  1:39 UTC (permalink / raw)
  To: yevgenyp; +Cc: eric.dumazet, netdev, eugenia

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-07  1:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-06  8:20 [PATCH 1/2] mlx4_en: Consider napi_get_frags() failure Yevgeny Petrilin
2010-09-07  1:39 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).