Re: [PATCH rdma-rc] RDMA/mlx5: Fix mkey cache possible deadlock on cleanup

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

 



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().

Thanks

> 
> Jason
> 



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux