]> git.baikalelectronics.ru Git - kernel.git/commitdiff
dev: Defer free of skbs in flush_backlog
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Thu, 23 Jul 2020 17:31:48 +0000 (11:31 -0600)
committerDavid S. Miller <davem@davemloft.net>
Sat, 25 Jul 2020 02:59:22 +0000 (19:59 -0700)
IRQs are disabled when freeing skbs in input queue.
Use the IRQ safe variant to free skbs here.

Fixes: ba461fc01c7b ("net: flush the softnet backlog in process context")
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c

index 90b59fc50dc9c99891f2510685061880abab17e8..7a774ebf64e26dca2c1247c80898e34bf600570b 100644 (file)
@@ -5601,7 +5601,7 @@ static void flush_backlog(struct work_struct *work)
        skb_queue_walk_safe(&sd->input_pkt_queue, skb, tmp) {
                if (skb->dev->reg_state == NETREG_UNREGISTERING) {
                        __skb_unlink(skb, &sd->input_pkt_queue);
-                       kfree_skb(skb);
+                       dev_kfree_skb_irq(skb);
                        input_queue_head_incr(sd);
                }
        }