aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/freescale/gianfar.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2014-03-11 17:20:26 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-12 16:22:13 -0400
commitc9974ad4aeb36003860100221a594f3c0ccc3f78 (patch)
treea7217a3be0171a0b78a474e0dbb2401675882f2a /drivers/net/ethernet/freescale/gianfar.c
parentd8ec2c02caa3515f35d6c33eedf529394c419298 (diff)
gianfar: Carefully free skbs in functions called by netpoll.
netpoll can call functions in hard irq context that are ordinarily called in lesser contexts. For those functions use dev_kfree_skb_any and dev_consume_skb_any so skbs are freed safely from hard irq context. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/gianfar.c')
-rw-r--r--drivers/net/ethernet/freescale/gianfar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 68d9bf7940f6..6e12f9365856 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -2192,13 +2192,13 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
2192 skb_new = skb_realloc_headroom(skb, fcb_len); 2192 skb_new = skb_realloc_headroom(skb, fcb_len);
2193 if (!skb_new) { 2193 if (!skb_new) {
2194 dev->stats.tx_errors++; 2194 dev->stats.tx_errors++;
2195 kfree_skb(skb); 2195 dev_kfree_skb_any(skb);
2196 return NETDEV_TX_OK; 2196 return NETDEV_TX_OK;
2197 } 2197 }
2198 2198
2199 if (skb->sk) 2199 if (skb->sk)
2200 skb_set_owner_w(skb_new, skb->sk); 2200 skb_set_owner_w(skb_new, skb->sk);
2201 consume_skb(skb); 2201 dev_consume_skb_any(skb);
2202 skb = skb_new; 2202 skb = skb_new;
2203 } 2203 }
2204 2204