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 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?

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