Subject: Re: [PATCH] usbnet: Fix using smp_processor_id() in preemptible code warnings

From: "Zqiang" <[email-masked]>
Date: Wed, 01 Oct 2025 00:56:49 +0000

> 
> 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.
>