freedreno/drm: Fix potential bo cache vs export crash
Keep the list head valid (empty) after allocation from bo cache. Avoids
a potential later crash in lookup_bo in the following sequence:
1. alloc, bo cache hit
2. export
3. re-import
Cc: mesa-stable
Fixes: f3cc0d2747 ("freedreno: import libdrm_freedreno + redesign submit")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6988
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17888>
This commit is contained in:
@@ -142,7 +142,7 @@ find_in_bucket(struct fd_bo_bucket *bucket, uint32_t flags)
|
||||
break;
|
||||
if (entry->alloc_flags == flags) {
|
||||
bo = entry;
|
||||
list_del(&bo->list);
|
||||
list_delinit(&bo->list);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user