[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1229550175-15600-1-git-send-email-afleming@freescale.com>
Date: Wed, 17 Dec 2008 15:42:51 -0600
From: Andy Fleming <afleming@...escale.com>
To: davem@...emloft.net, jeff@...zik.org
Cc: netdev@...r.kernel.org, Andy Fleming <afleming@...escale.com>
Subject: [PATCH v2.6.29 v3 1/5] gianfar: Fix packet drop when out of memory
The patch which fixed gianfar so it drops packets when it runs out
of memory left in the code which frees the skb when it drops packets.
Change the code so that we only free the skb if the new skb was successfully
created.
Signed-off-by: Andy Fleming <afleming@...escale.com>
---
drivers/net/gianfar.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 3e611a6..a6efabc 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -1732,8 +1732,7 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit)
if (unlikely(!newskb))
newskb = skb;
-
- if (skb)
+ else if (skb)
dev_kfree_skb_any(skb);
} else {
/* Increment the number of packets */
--
1.5.4.GIT
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists