diff options
author | Varad Gautam <varadgautam@gmail.com> | 2015-08-21 22:14:33 +0530 |
---|---|---|
committer | Rob Clark <robclark@freedesktop.org> | 2015-08-23 12:33:09 -0400 |
commit | 857c22e5ecf016bcd15508fec6e6d435bf69b58d (patch) | |
tree | 2e9a5311b4ade95a037189cc66c5fe61c7cf7967 /freedreno | |
parent | cf40cf05a4d7f3945d534790e7768a048adc3ab0 (diff) |
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>
Diffstat (limited to 'freedreno')
-rw-r--r-- | freedreno/freedreno_bo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/freedreno/freedreno_bo.c b/freedreno/freedreno_bo.c index eec218c6..972ee17d 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; } |