Re: [RFC PATCH v6 07/11] leds: trigger: netdev: use mutex instead of spinlocks

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

 



On Thu, May 05, 2022 at 03:10:21AM +0200, Andrew Lunn wrote:
> > @@ -400,7 +400,7 @@ static int netdev_trig_notify(struct notifier_block *nb,
> >  
> >  	cancel_delayed_work_sync(&trigger_data->work);
> >  
> > -	spin_lock_bh(&trigger_data->lock);
> > +	mutex_lock(&trigger_data->lock);
> 
> I'm not sure you can convert a spin_lock_bh() in a mutex_lock().
> 
> Did you check this? What context is the notifier called in?
> 
>     Andrew

I had to do this because qca8k use completion to set the value and that
can sleep... Mhhh any idea how to handle this?

-- 
	Ansuel



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux