Commit f0e86d27 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Kamal Mostafa

r8169: Call dev_kfree_skby_any instead of dev_kfree_skb.

commit 989c9ba1 upstream.

Replace dev_kfree_skb with dev_kfree_skb_any in functions that can
be called in hard irq and other contexts.
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 091bfe47
...@@ -5835,7 +5835,7 @@ static void rtl8169_tx_clear_range(struct rtl8169_private *tp, u32 start, ...@@ -5835,7 +5835,7 @@ static void rtl8169_tx_clear_range(struct rtl8169_private *tp, u32 start,
tp->TxDescArray + entry); tp->TxDescArray + entry);
if (skb) { if (skb) {
tp->dev->stats.tx_dropped++; tp->dev->stats.tx_dropped++;
dev_kfree_skb(skb); dev_kfree_skb_any(skb);
tx_skb->skb = NULL; tx_skb->skb = NULL;
} }
} }
...@@ -6060,7 +6060,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb, ...@@ -6060,7 +6060,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
err_dma_1: err_dma_1:
rtl8169_unmap_tx_skb(d, tp->tx_skb + entry, txd); rtl8169_unmap_tx_skb(d, tp->tx_skb + entry, txd);
err_dma_0: err_dma_0:
dev_kfree_skb(skb); dev_kfree_skb_any(skb);
err_update_stats: err_update_stats:
dev->stats.tx_dropped++; dev->stats.tx_dropped++;
return NETDEV_TX_OK; return NETDEV_TX_OK;
...@@ -6143,7 +6143,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp) ...@@ -6143,7 +6143,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp)
tp->tx_stats.packets++; tp->tx_stats.packets++;
tp->tx_stats.bytes += tx_skb->skb->len; tp->tx_stats.bytes += tx_skb->skb->len;
u64_stats_update_end(&tp->tx_stats.syncp); u64_stats_update_end(&tp->tx_stats.syncp);
dev_kfree_skb(tx_skb->skb); dev_kfree_skb_any(tx_skb->skb);
tx_skb->skb = NULL; tx_skb->skb = NULL;
} }
dirty_tx++; dirty_tx++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment