From: Ruan Jinjie <ruanjinjie@huawei.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: <philipp.g.hortmann@gmail.com>, <straube.linux@gmail.com>,
<Larry.Finger@lwfinger.net>, <wlanfae@realtek.com>,
<mikem@ring3k.org>, <seanm@seanm.ca>,
<linux-staging@lists.linux.dev>
Subject: Re: [PATCH -next v2 1/3] staging: rtl8192e: rtl_core: Call dev_kfree_skb_irq() instead of kfree_skb() under spin_lock_irqsave()
Date: Thu, 14 Sep 2023 10:00:17 +0800 [thread overview]
Message-ID: <89d2e898-3a5f-75cd-14db-1af3319a2a4d@huawei.com> (raw)
In-Reply-To: <2023091352-mouth-escapist-6eb4@gregkh>
On 2023/9/13 16:34, Greg KH wrote:
> On Fri, Aug 25, 2023 at 09:52:11AM +0800, Jinjie Ruan wrote:
>> It is not allowed to call kfree_skb() from hardware interrupt
>> context or with hardware interrupts being disabled.
>
> Why not? Seems to work so far :)
The commit e6247027e517 ("net: introduce dev_consume_skb_any()") has the
below comment:
3830 /*
3831 * It is not allowed to call kfree_skb() or consume_skb() from hardware
3832 * interrupt context or with hardware interrupts being disabled.
3833 * (in_hardirq() || irqs_disabled())
3834 *
3835 * We provide four helpers that can be used in following contexts :
3836 *
3837 * dev_kfree_skb_irq(skb) when caller drops a packet from irq context,
3838 * replacing kfree_skb(skb)
3839 *
3840 * dev_consume_skb_irq(skb) when caller consumes a packet from irq
context.
3841 * Typically used in place of consume_skb(skb) in TX completion path
3842 *
3843 * dev_kfree_skb_any(skb) when caller doesn't know its current irq
context,
3844 * replacing kfree_skb(skb)
3845 *
3846 * dev_consume_skb_any(skb) when caller doesn't know its current
irq context,
3847 * and consumed a packet. Used in place of consume_skb(skb)
3848 */
>
> Are you fixing up all of the normal network drivers for this first?
>
> thanks,
>
> greg k-h
next prev parent reply other threads:[~2023-09-14 2:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-25 1:52 [PATCH -next v2 0/3] staging: rtl8192e: Do not call kfree_skb() under spin_lock_irqsave() Jinjie Ruan
2023-08-25 1:52 ` [PATCH -next v2 1/3] staging: rtl8192e: rtl_core: Call dev_kfree_skb_irq() instead of " Jinjie Ruan
2023-09-13 8:34 ` Greg KH
2023-09-14 2:00 ` Ruan Jinjie [this message]
2023-08-25 1:52 ` [PATCH -next v2 2/3] staging: rtl8192e: rtl_core: Do not call kfree_skb() under spin_lock_irqsave() for _rtl92e_irq() Jinjie Ruan
2023-08-25 1:52 ` [PATCH -next v2 3/3] Staging: rtl8192e: rtllib_softmac: Do not call kfree_skb() under spin_lock_irqsave() Jinjie Ruan
2023-08-25 5:47 ` [PATCH -next v2 0/3] staging: rtl8192e: " Philipp Hortmann
2023-09-05 12:16 ` Dan Carpenter
2023-09-05 11:59 ` Dan Carpenter
2023-09-14 2:01 ` Ruan Jinjie
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=89d2e898-3a5f-75cd-14db-1af3319a2a4d@huawei.com \
--to=ruanjinjie@huawei.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-staging@lists.linux.dev \
--cc=mikem@ring3k.org \
--cc=philipp.g.hortmann@gmail.com \
--cc=seanm@seanm.ca \
--cc=straube.linux@gmail.com \
--cc=wlanfae@realtek.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