From: Yang Yingliang <yangyingliang@huawei.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <netdev@vger.kernel.org>, <isdn@linux-pingi.de>, <davem@davemloft.net>
Subject: Re: [PATCH net 1/3] mISDN: hfcsusb: don't call dev_kfree_skb() under spin_lock_irqsave()
Date: Mon, 12 Dec 2022 09:58:03 +0800 [thread overview]
Message-ID: <cea4e99a-10f0-c959-c1f2-30fc6614c219@huawei.com> (raw)
In-Reply-To: <20221209155758.459b858d@kernel.org>
On 2022/12/10 7:57, Jakub Kicinski wrote:
> 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.
skb_queue_purge() calls kfree_skb() which is not allowed in this
case, I will send a v2 to change it.
Thanks,
Yang
>
>> if (dch->tx_skb) {
>> - dev_kfree_skb(dch->tx_skb);
>> + dev_consume_skb_irq(dch->tx_skb);
> .
next prev parent reply other threads:[~2022-12-12 1:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 9:32 [PATCH net 0/3] mISDN: don't call dev_kfree_skb() under spin_lock_irqsave() Yang Yingliang
2022-12-07 9:32 ` [PATCH net 1/3] mISDN: hfcsusb: " Yang Yingliang
2022-12-07 14:54 ` Jiri Pirko
2022-12-09 23:57 ` Jakub Kicinski
2022-12-12 1:58 ` Yang Yingliang [this message]
2022-12-07 9:32 ` [PATCH net 2/3] mISDN: hfcpci: " Yang Yingliang
2022-12-07 14:58 ` Jiri Pirko
2022-12-07 9:32 ` [PATCH net 3/3] mISDN: hfcmulti: " Yang Yingliang
2022-12-07 14:59 ` Jiri Pirko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cea4e99a-10f0-c959-c1f2-30fc6614c219@huawei.com \
--to=yangyingliang@huawei.com \
--cc=davem@davemloft.net \
--cc=isdn@linux-pingi.de \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox