[Mesa-dev] [PATCH 0/6] Fix map/unmaps from different contexts

Nicolai Hähnle nhaehnle at gmail.com
Tue Sep 27 18:21:14 UTC 2016


Hi all,

it can happen that a buffer that is mapped from one context ends up being
unmapped in another one. I found nothing in the spec to forbid it, and in
any case it's a scenario that people are increasingly likely to run into
with persistent maps and multiple contexts.

This leads to crashes in some drivers because the Gallium pipe_transfer
object is allocated from a per-context allocator.

While a possible fix would be to simply use a per-screen allocator, this
would require an additional mutex lock/unlock in a pretty critical path.
This series takes an alternative path of re-designing util/slab so that
it can support free-ing an object in a different pool than the one it was
allocated from. Please review!

Thanks,
Nicolai



More information about the mesa-dev mailing list