Linux wireless drivers development
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Yang Yingliang <yangyingliang@huawei.com>,
	"kvalo@kernel.org" <kvalo@kernel.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH resend 1/3] rtlwifi: rtl8821ae: don't call kfree_skb() under spin_lock_irqsave()
Date: Wed, 7 Dec 2022 03:52:33 +0000	[thread overview]
Message-ID: <1bbd83a4cd6f48e5878c256c3e8f6334@realtek.com> (raw)
In-Reply-To: <c9096bc2-8765-8bf5-484b-da949c99e236@huawei.com>


> -----Original Message-----
> From: Yang Yingliang <yangyingliang@huawei.com>
> Sent: Wednesday, December 7, 2022 11:44 AM
> To: Ping-Ke Shih <pkshih@realtek.com>; kvalo@kernel.org
> Cc: linux-wireless@vger.kernel.org; yangyingliang@huawei.com
> Subject: Re: [PATCH resend 1/3] rtlwifi: rtl8821ae: don't call kfree_skb() under spin_lock_irqsave()
> 
> 
> On 2022/12/7 11:31, Ping-Ke Shih wrote:
> >> -----Original Message-----
> >> From: Yang Yingliang <yangyingliang@huawei.com>
> >> Sent: Tuesday, December 6, 2022 9:13 PM
> >> To: Ping-Ke Shih <pkshih@realtek.com>; kvalo@kernel.org
> >> Cc: linux-wireless@vger.kernel.org; yangyingliang@huawei.com
> >> Subject: [PATCH resend 1/3] rtlwifi: rtl8821ae: don't call kfree_skb() under spin_lock_irqsave()
> >>
> >> It is not allowed to call kfree_skb() from hardware interrupt
> >> context or with interrupts being disabled. So add all skb to
> >> a free list, then free them after spin_unlock_irqrestore() at
> >> once.
> > The patch doesn't change logic, so it should work. But, I would like to know
> > if there is a comment about this in kernel code. Could you point it out?
> You can see comment of dev_kfree_skb_irq() in include/linux/netdevice.h
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/netdevice.h?h=v6
> .1-rc8
> 

It seems like we can replace kfree_skb() by dev_kfree_skb_irq(), right?
But your method is more efficient. Is that your point?

Ping-Ke


  reply	other threads:[~2022-12-07  3:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 13:12 [PATCH resend 0/3] rtlwifi: don't call kfree_skb() under spin_lock_irqsave() Yang Yingliang
2022-12-06 13:12 ` [PATCH resend 1/3] rtlwifi: rtl8821ae: " Yang Yingliang
2022-12-07  3:31   ` Ping-Ke Shih
2022-12-07  3:44     ` Yang Yingliang
2022-12-07  3:52       ` Ping-Ke Shih [this message]
2022-12-07  4:41         ` Yang Yingliang
2022-12-07  5:07           ` Ping-Ke Shih
2022-12-06 13:12 ` [PATCH resend 2/3] rtlwifi: rtl8188ee: " Yang Yingliang
2022-12-06 13:12 ` [PATCH resend 3/3] rtlwifi: rtl8723be: " Yang Yingliang

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=1bbd83a4cd6f48e5878c256c3e8f6334@realtek.com \
    --to=pkshih@realtek.com \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=yangyingliang@huawei.com \
    /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