mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-22 13:50:11 +01:00
freedreno: fix a bo cache segfault with imported bo's
Importing a bo whose handle is still in the bo cache crashes during cleanup. Remove bo from cache when importing. Signed-off-by: Varad Gautam <varadgautam@gmail.com> Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
cf40cf05a4
commit
857c22e5ec
1 changed files with 3 additions and 0 deletions
|
|
@ -52,6 +52,9 @@ static struct fd_bo * lookup_bo(void *tbl, uint32_t key)
|
|||
if (!drmHashLookup(tbl, key, (void **)&bo)) {
|
||||
/* found, incr refcnt and return: */
|
||||
bo = fd_bo_ref(bo);
|
||||
|
||||
/* don't break the bucket if this bo was found in one */
|
||||
list_delinit(&bo->list);
|
||||
}
|
||||
return bo;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue