]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
lan78xx: Do not access skb_queue_head list pointers directly.
authorDavid S. Miller <davem@davemloft.net>
Tue, 7 Aug 2018 06:12:17 +0000 (23:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Sep 2018 17:06:53 +0000 (10:06 -0700)
Use skb_queue_walk() instead.

Adjust inner loop test to utilize and skb_queue_is_first().
Unfortunately we have to keep pkt_cnt around because it is
used by a latter loop in this function.

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/lan78xx.c

index 331bc99d55e7632f764a97953e5cfacc7eff8c62..3ce3c66559e4a8bf86a151d2518f1f3e48743c5b 100644 (file)
@@ -3340,9 +3340,9 @@ static void lan78xx_tx_bh(struct lan78xx_net *dev)
        count = 0;
        length = 0;
        spin_lock_irqsave(&tqp->lock, flags);
-       for (skb = tqp->next; pkt_cnt < tqp->qlen; skb = skb->next) {
+       skb_queue_walk(tqp, skb) {
                if (skb_is_gso(skb)) {
-                       if (pkt_cnt) {
+                       if (!skb_queue_is_first(tqp, skb)) {
                                /* handle previous packets first */
                                break;
                        }