Re: [PATCH 2/2] r8152: Call napi_schedule() from proper context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le Wed, Feb 12, 2025 at 09:49:29PM +0100, Francois Romieu a écrit :
> Frederic Weisbecker <frederic@xxxxxxxxxx> :
> [...]
> > r8152 may call napi_schedule() on device resume time from a bare task
> > context without disabling softirqs as the following trace shows:
> [...]
> > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> > index 468c73974046..1325460ae457 100644
> > --- a/drivers/net/usb/r8152.c
> > +++ b/drivers/net/usb/r8152.c
> > @@ -8537,8 +8537,11 @@ static int rtl8152_runtime_resume(struct r8152 *tp)
> >  		clear_bit(SELECTIVE_SUSPEND, &tp->flags);
> >  		smp_mb__after_atomic();
> >  
> > -		if (!list_empty(&tp->rx_done))
> > +		if (!list_empty(&tp->rx_done)) {
> > +			local_bh_disable();
> >  			napi_schedule(&tp->napi);
> > +			local_bh_enable();
> > +		}
> 
> AFAIU drivers/net/usb/r8152.c::rtl_work_func_t exhibits the same
> problem.

It's a workqueue function and softirqs don't seem to be disabled.
Looks like a goot catch!

Thanks.

> 
> -- 
> Ueimor




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux