Subject: Re: [PATCH net 1/3] mISDN: hfcsusb: don't call dev_kfree_skb() under spin_lock_irqsave()

From: Jakub Kicinski <[email-masked]>
Date: Fri, 9 Dec 2022 15:57:58 -0800

On Wed, 7 Dec 2022 17:32:37 +0800 Yang Yingliang wrote:
>  			spin_lock_irqsave(&hw->lock, flags);
>  			skb_queue_purge(&dch->squeue);

Please take a look at what skb_queue_purge() does.
Perhaps you should create a skb_buff_head on the stack,
skb_queue_splice_init() from the sch->squeue onto that
queue, add the rx_skb and tx_skb into that queue,
then drop the lock and skb_queue_purge() outside the lock.

>  			if (dch->tx_skb) {
> -				dev_kfree_skb(dch->tx_skb);
> +				dev_consume_skb_irq(dch->tx_skb);