public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ivan Vecera <ivecera@redhat.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: netdev@vger.kernel.org, poros@redhat.com, mschmidt@redhat.com,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Dave Ertman <david.m.ertman@intel.com>,
	Shiraz Saleem <shiraz.saleem@intel.com>,
	"moderated list:INTEL ETHERNET DRIVERS" 
	<intel-wired-lan@lists.osuosl.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net v2] ice: Fix race during aux device (un)plugging
Date: Thu, 21 Apr 2022 08:08:48 +0200	[thread overview]
Message-ID: <20220421080848.41bed123@ceranb> (raw)
In-Reply-To: <YmDn2ptpRHasOQag@unreal>

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.


      reply	other threads:[~2022-04-21  6:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20 15:02 [PATCH net v2] ice: Fix race during aux device (un)plugging Ivan Vecera
2022-04-21  5:12 ` Leon Romanovsky
2022-04-21  6:08   ` Ivan Vecera [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220421080848.41bed123@ceranb \
    --to=ivecera@redhat.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=david.m.ertman@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mschmidt@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=poros@redhat.com \
    --cc=shiraz.saleem@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox