Re: [Mesa-dev] [PATCH v3] anv/allocator: Avoid race condition in anv_block_pool_map.

2019-01-23 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Wed, Jan 23, 2019 at 6:41 PM Rafael Antognolli < rafael.antogno...@intel.com> wrote: > Accessing bo->map and then pool->center_bo_offset without a lock is > racy. One way of avoiding such race condition is to store the bo->map + > center_bo_offset into pool->map at

[Mesa-dev] [PATCH v3] anv/allocator: Avoid race condition in anv_block_pool_map.

2019-01-23 Thread Rafael Antognolli
Accessing bo->map and then pool->center_bo_offset without a lock is racy. One way of avoiding such race condition is to store the bo->map + center_bo_offset into pool->map at the time the block pool is growing, which happens within a lock. v2: Only set pool->map if not using softpin (Jason). v3: M