From: "Zqiang" <qiang.zhang@linux.dev>
To: "Jakub Kicinski" <kuba@kernel.org>
Cc: horms@kernel.org, davem@davemloft.net, pabeni@redhat.com,
netdev@vger.kernel.org
Subject: Re: [PATCH] usbnet: Fix using smp_processor_id() in preemptible code warnings
Date: Wed, 01 Oct 2025 00:56:49 +0000 [thread overview]
Message-ID: <f7e414eaef1f722ae125cf3601a0567136f973fc@linux.dev> (raw)
In-Reply-To: <20250930174340.5e554e10@kernel.org>
>
> On Wed, 01 Oct 2025 00:39:18 +0000 Zqiang wrote:
>
> >
> > We also call netif_rx() which historically wanted to be in bh context.
> > I think that disabling bh in usbnet_resume_rx() may be a better idea.
> >
> > Actually, the netif_rx() will disable bh internally when call from
> > process context.
> >
> Sigh. I said "historically". Commit under Fixes is very old
> so the fix needs to be backported. Look thru the git history
> you'll see that netif_rx() did not disable BH when the bad commit
> was written.
>
> >
> > but the skb_defer_rx_timestamp() is usually called in the bh or
> > interrupt context.
> >
> > Anyway, I will disable bh in usbnet_resume_rx() and resend.
> >
> If you think you have better solution, please do not hesitate
> to propose.
Maybe we can use netif_receive_skb() instead of skb_defer_rx_timestamp()
and netif_rcv() in the usbnet_skb_return() and disbale bh in usbnet_resume_rx().
Any thoughts ?
Thanks
Zqiang
>
> Also make sure you read
> https://www.kernel.org/doc/html/next/process/maintainer-netdev.html
> if you haven't already.
>
prev parent reply other threads:[~2025-10-01 0:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-30 8:46 [PATCH] usbnet: Fix using smp_processor_id() in preemptible code warnings Zqiang
2025-09-30 17:30 ` Jakub Kicinski
2025-10-01 0:39 ` Zqiang
2025-10-01 0:43 ` Jakub Kicinski
2025-10-01 0:56 ` Zqiang [this message]
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=f7e414eaef1f722ae125cf3601a0567136f973fc@linux.dev \
--to=qiang.zhang@linux.dev \
--cc=davem@davemloft.net \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).