mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
iris: Fix locking around vma_alloc in iris_bo_create_userptr
util_vma needs to be protected by a lock. All other callers of vma_alloc and vma_free appear to be holding a lock already. Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
parent
5fc11fd988
commit
78003014d0
1 changed files with 4 additions and 0 deletions
|
|
@ -581,7 +581,11 @@ iris_bo_create_userptr(struct iris_bufmgr *bufmgr, const char *name,
|
|||
|
||||
bo->bufmgr = bufmgr;
|
||||
bo->kflags = EXEC_OBJECT_SUPPORTS_48B_ADDRESS | EXEC_OBJECT_PINNED;
|
||||
|
||||
mtx_lock(&bufmgr->lock);
|
||||
bo->gtt_offset = vma_alloc(bufmgr, memzone, size, 1);
|
||||
mtx_unlock(&bufmgr->lock);
|
||||
|
||||
if (bo->gtt_offset == 0ull)
|
||||
goto err_close;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue