From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Shay Drory <shayd@nvidia.com>,
linux-rdma@vger.kernel.org,
Michael Guralnik <michaelgur@nvidia.com>
Subject: Re: [PATCH rdma-rc] RDMA/mlx5: Fix mkey cache possible deadlock on cleanup
Date: Thu, 21 Sep 2023 09:00:31 -0300 [thread overview]
Message-ID: <20230921120031.GL13733@nvidia.com> (raw)
In-Reply-To: <20230921082716.GC1642130@unreal>
On Thu, Sep 21, 2023 at 11:27:16AM +0300, Leon Romanovsky wrote:
> On Wed, Sep 20, 2023 at 11:01:12AM -0300, Jason Gunthorpe wrote:
> > On Wed, Sep 20, 2023 at 12:56:18PM +0300, Leon Romanovsky wrote:
> > > @@ -1796,6 +1804,10 @@ static int cache_ent_find_and_store(struct mlx5_ib_dev *dev,
> > > }
> > >
> > > mutex_lock(&cache->rb_lock);
> > > + if (cache->disable) {
> > > + mutex_unlock(&cache->rb_lock);
> > > + return 0;
> > > + }
> >
> >
> > I don't get this.
> >
> > Shouldn't we just initialize the ent->disabled to cache->disabled if
> > we happen to be creating a new ent?
> I'm convinced that new entries can't be created when we are calling to
> mlx5_mkey_cache_cleanup().
That's a better answer
Jason
next prev parent reply other threads:[~2023-09-21 20:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-20 9:56 [PATCH rdma-rc] RDMA/mlx5: Fix mkey cache possible deadlock on cleanup Leon Romanovsky
2023-09-20 14:01 ` Jason Gunthorpe
2023-09-21 8:27 ` Leon Romanovsky
2023-09-21 12:00 ` Jason Gunthorpe [this message]
2023-09-26 9:37 ` Leon Romanovsky
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=20230921120031.GL13733@nvidia.com \
--to=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=michaelgur@nvidia.com \
--cc=shayd@nvidia.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