Skip to content
Snippets Groups Projects
Commit 86b3d8c6 authored by Mike Blumenkrantz's avatar Mike Blumenkrantz :lifter: Committed by Marge Bot
Browse files

zink: rescue surfaces/bufferviews for cache hits during deletion


this is a wild race condition, but it's possible for these to get their
final unref, enter their destructor, and then get a cache hit while waiting
on the lock to remove themselves from the cache

in such a scenario, a second, normal check of the refcount will suffice,
as the increment is atomic, and the value will otherwise be zero

fixes crashes in basemark

cc: mesa-stable

Reviewed-by: default avatarHoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
Part-of: <mesa/mesa!13442>
parent 80d5e40f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment