[Freedreno] [PATCH libdrm 1/4] freedreno: fix a bo cache segfault with imported bo's
Varad Gautam
varadgautam at gmail.com
Fri Aug 21 09:44:33 PDT 2015
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 at gmail.com>
---
freedreno/freedreno_bo.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/freedreno/freedreno_bo.c b/freedreno/freedreno_bo.c
index eec218c..972ee17 100644
--- a/freedreno/freedreno_bo.c
+++ b/freedreno/freedreno_bo.c
@@ -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;
}
--
2.4.6
More information about the Freedreno
mailing list