r8169: Do not use dev_kfree_skb in xmit path
The function r8169_csum_workaround is called in the ndo_start_xmit path of the r8169 driver. As such it should not be using dev_kfree_skb as it is not irq safe, so instead we should be using dev_kfree_skb_any for freeing in the dropped path, and dev_consume_skb_any for any frames that were transmitted. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
59486329b4
Коммит
eb78139790
|
@ -6884,7 +6884,7 @@ static void r8169_csum_workaround(struct rtl8169_private *tp,
|
||||||
rtl8169_start_xmit(nskb, tp->dev);
|
rtl8169_start_xmit(nskb, tp->dev);
|
||||||
} while (segs);
|
} while (segs);
|
||||||
|
|
||||||
dev_kfree_skb(skb);
|
dev_consume_skb_any(skb);
|
||||||
} else if (skb->ip_summed == CHECKSUM_PARTIAL) {
|
} else if (skb->ip_summed == CHECKSUM_PARTIAL) {
|
||||||
if (skb_checksum_help(skb) < 0)
|
if (skb_checksum_help(skb) < 0)
|
||||||
goto drop;
|
goto drop;
|
||||||
|
@ -6896,7 +6896,7 @@ static void r8169_csum_workaround(struct rtl8169_private *tp,
|
||||||
drop:
|
drop:
|
||||||
stats = &tp->dev->stats;
|
stats = &tp->dev->stats;
|
||||||
stats->tx_dropped++;
|
stats->tx_dropped++;
|
||||||
dev_kfree_skb(skb);
|
dev_kfree_skb_any(skb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче