[Intel-wired-lan] [PATCH net v2] ice: Fix race during aux device (un)plugging

Ivan Vecera ivecera at redhat.com
Thu Apr 21 06:08:48 UTC 2022


On Thu, 21 Apr 2022 08:12:58 +0300
Leon Romanovsky <leon at kernel.org> wrote:

> >  static struct iidc_auxiliary_drv *ice_get_auxiliary_drv(struct ice_pf *pf)
> >  {
> >  	struct auxiliary_device *adev;
> >  
> > +	BUG_ON(!mutex_is_locked(&pf->adev_mutex));  
> 
> Please don't add BUG_ON() in driver code.
> 
> I think that you are looking for lockdep_assert_held(&pf->adev_mutex).

Will fix.

I.



More information about the Intel-wired-lan mailing list