lkml.org 
[lkml]   [2022]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net v2] ice: Fix race during aux device (un)plugging
On Thu, 21 Apr 2022 08:12:58 +0300
Leon Romanovsky <leon@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.

\
 
 \ /
  Last update: 2022-04-21 08:10    [W:0.038 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site